.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:

  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 ()  

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

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

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -