.net - ADO.net Entity Framework: Update only certian properties on a detached entity -
I want to update a unit without loading unit from the first database. I completed it, but only after knowing the properties of all entities and then using "Atato" method. My problem is that I do not want to remember all the properties of my app. Example: unit area on the one that's why "". I do not want to pass this "created" date through my "n" level app. How do I "update" the area when saving the database? Thanks! Paul
new shopper as dim customerEntitiy customerEntitiy.shopper_id = CustomerData.CustomerID customerEntitiy.market_code = CustomerData.MarketSector customerEntitiy.email = CustomerData.Email customerEntitiy.modified = DateTime.Now context.AttachTo (made "shopper", customerEntitiy) context.SaveChanges ()
I figure it out, basically, you instead use a stub, attach it , then set props you want to update the unit structure will update only changed things
dim customerEntitiy as new commerce_shopper customerEntitiy.shopper_id = CustomerData.CustomerID context.AttachTo ( " Commerce_shopper ", customerEntitiy) 'This primary key is' customerEntitiy.market_code = CustomerData.MarketSector customerEntitiy.email = CustomerData.Email customerEntitiy.modified = DateTime.Now context.SaveChanges ()
This" Built "date field ignore.
Comments
Post a Comment