Browse by Tags
All Tags »
C# 3.0 »
EF (
RSS)
MetaLinq project now supports serializing expression trees with XmlSerializer. For further information about this project, read my previous post on the subject.
When you build a EF schema, it automatically plant the name of the imported tables schema into the EDMX file. But alas, what happens when you work in different environments (such as Dev, Test, Prod...) and in each database, the schema of the tables is different? Basically you either reset all your databases to use the same schema or worse - change the EDMX and recompile the assembly before updating the wanted environment. But there is another solution, not a clear one, probably not a supported one...
I've received a couple of request to write some of my previous posts in English so that all other 99.7% of the developers community in the world which finds these subjects interesting can understand what I'm writing. The following post is a translation to English of this Hebrew post . When Entity Framework (EF for short) was designed, Microsoft decided the loading of entities will be during run-time in a JIT like mechanism. They achieved this by using the lazy loading technique - access the...
כפי שאתם יודעים, אחד מהחידושים של C# 3.0 הוא Partial Method שמאפשר לנו לכתוב מתודות Partial ולממשן (או שלא) בקובץ נפרד. אחד המקומות שמשתמשים לדוגמה ב-Partial Method הוא בקוד המחולל מסכמת EDMX של Ado.Net Entity Framework. במסגרת פרויקט שעשיתי לאחרונה הייתי צריך לבנות דיאגרמת EDMX תכנותית, לייצר ממנה קוד CS ולקמפל את הקובץ שנוצר ל-DLL. השלבים שיש לבצע הם : בניית קובץ EDMX - הסבר בפוסטים הבאים בניית CS מתוך ה-EDMX (או ליתר דיוק, מתוך ה-CSDL שבתוכו). זאת ניתן לעשות באמצעות מחלקות ה-Designer של Entity...