Is there a way to call T-Sql's MERGE command from .NET Entity framework 4?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
No there no such built-in functionality - you must build your own. Very common is for example approach like:
This is example for working with detached entity which have
Id
auto generated in the database (IDENTITY
). Default Id for new entity is always 0 because the real value will be assigned during saving changes.