Archives / 2010 / April
  • Calling User Defined Database Function From LINQ

    Entity Framework 4.0 allows you to call a database function both in an esql query and linq to entities. However database function can only return scalar types. Future version would support table valued functions. To use a database function in a query, you have to perform the following steps.

  • Complex Type and POCO

    Change tracking in poco objects can be accomplished in two ways. If you mark your properties as virtual, EF will create a proxy object for your entity and any property changes will be notified to the ObjectStateManager immediately. However bare bone poco class has no mechanism to inform ObjectStateManager of changes occurring. When poco object is attached to the context, EF will take a snap shot of the current property values and when DetectChanges is called either explicitly or implicitly when SaveChanges occurs, EF will walk the object graph looking for changes that have occurred and modify the state of the object correctly in the state manager. This form of change tracking is called Snap Shot based change tracking where EF takes a snap shot of the original object and then a modified object to find the difference. Let’s look at example of a model consisting of Employee entity with Name property as complex type.

  • Entity Framework 4.0 class at Collins Community College

    Today I presented at Dallas C# user group. The audience was great with lots of interesting question. I met some new faces which i never saw. I saw substantial women participation in the group as compared to previous times which indicates that more women are in technology then you would think.  In fact my old friend Teresa was there too(thks for showing up girl!)

  • I finally became MVP

    I am excited to announce that i got awarded MVP title for the first time. Last year, i have spent good amount of time in the community by speaking in user groups, webcasts, writing book and helping developers on the Entity Framework Forum. With full time school and plus home work, it is tough to take time out for anything else. Hopefully i will continue to share my knowledge in the community and speak more often.

  • Entity Framework Videos

    Not too long ago, I gave two presentations on Entity Framework 4.0 covering new features like complex type, functions, stored procedures, POCO, Self Tracking Entity and some other features. Shawn was kind enough to record the videos for INETA.