Search Results

Search found 28 results on 2 pages for 'plotnick'.

Page 2/2 | < Previous Page | 1 2 

  • EntityFramework how to Override properties

    - by plotnick
    I've just started using EF in VS2010. That thing is just amazin'. I frankly can't understand something. For example I have EntityType with property, they generated from database structure. Now, I have to simply override that property in my code. I don't need to save value of the property back into DB, but everytime when it gets read from DB it should be substituted with run-time calculated value. Of course I can create derived class based on my EntityType but I've tried and found kinda difficulties, I'm not sure this is kinda right way to do. Anyway even when I try to change the whole EntityType to Abstract, damn Visual Studio doesn't want to validate that and says something like: "Error 2078: The EntityType 'AssetsModel.Asset' is Abstract and can be mapped only using IsTypeOf." "Error 2063: At least one property must be mapped in the set mapping for 'Assets'" What the hell is this suppose to mean I dunno.. Any ideas gentlemen?

    Read the article

  • 'Subquery returned more than 1 value' problem in EntityFramework

    - by plotnick
    I have one 'Transaction' entity object with 'Operations' navproperty with multiplicity of 'Many'. When I'm adding only one operation per transaction nothing happens, but when I'm trying to add more than one operation, db.SaveChanges() throws an exception like 'Subquery returned more than 1 value blah, blah, blah' How can I solve that? Help me guys please... BTW... Could you tell me how can I see the exact query string that EF passes to Sql Server on db.SaveChanges() method?

    Read the article

< Previous Page | 1 2