Vahid Nasiri

My feedback

  1. 965 votes
    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)

      We’ll send you updates on this idea

      Vahid Nasiri commented  · 

      Here you can find an implementation of second level caching in EF Code first:
      http://www.dotnettips.info/File/UserFile?name=EfSecondLevelCaching.zip

    • 94 votes
      Sign in
      Check!
      (thinking…)
      Reset
      or sign in with
      • facebook
      • google
        Password icon
        Signed in as (Sign out)

        We’ll send you updates on this idea

        Vahid Nasiri commented  · 

        void ExportMappings(DbContext context, string edmxFile)
        {
        var settings = new XmlWriterSettings { Indent = true };
        using (XmlWriter writer = XmlWriter.Create(edmxFile, settings))
        {
        System.Data.Entity.Infrastructure.EdmxWriter.WriteEdmx(context, writer);
        }
        }

        //usage:
        using (var db = new Sample06Context())
        {
        ExportMappings(db, "mappings.edmx");
        }

      Feedback and Knowledge Base