Vahid Nasiri

My feedback

  1. 965 votes
    Sign in
    (thinking…)
    Sign in with: facebook google
    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

  2. 94 votes
    Sign in
    (thinking…)
    Sign in with: facebook google
    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