Tag: EF

  • Optimizing EF4 and EDMGen2

    Just reading (from Adrian Florea links ) how the EF4 could be optimized : http://www.codeproject.com/KB/database/PerfEntityFramework.aspx First modification is to “Pre-generated Your View”. For this you must have .ssdl,.csdl,and .msl files – so you change the “Metadata Artifact Processing property to: Copy to Output Directory.”. Then you process the .ssdl,.csdl,and .msl with edmgen in order to…

  • EF Profiler and investigating object context

    Summary : EF Profiler worth his money ! Long Description : I have finished a application with Entity Framework and POCO – and custom generated (.tt) files. Now it was time to investigate performance  – and it was a terrific problem. How EF Prof helped me : 1.  Displaying number of ObjectContext created and disposed…

  • Generating history trigger with EF,edmx and TT files

    I have wrote in an older post ( http://msprogrammer.serviciipeweb.ro/2010/06/28/ef-automatic-history-of-table-and-t4-files-tt-files/ ) how to generate history code for tables . The easy solution was to create a tt file that track for the ObjectContext the SaveChanges for each table that has a “history” in name. the limitation is that,when you raise an sql command such as “update…

  • EF,automatic history of table and T4 files (TT files)

    Usually the data of the tables should be tracking for who modified it. Think about inserting/updating/deleting an employee :   you must know who did those actions and when. So you create another table,identically as structure,and you add another 3 fields,such as [ModifiedDate](when),[ModifiedBy](who),[ModifiedType] (what : insert,update,delete). There are several methods to do it : from database…

  • ASP.NET MVC,ORM and ViewModels

    Since I am active on asp.net/mvc I find many peoples asking about One to many relationship . Dropdownlist How to use MVC with other ORM frameworks instead of Linq To Sql(L2S) ? What is a ViewModel and what is his purpose ? For answering,I have made a small application with MVC2 in order to detail…