This question is locked. New answers and comments are not allowed.
Hello,
is there a way (generic) to check if a object already exists in the database?
example:
Now I have no ideas to do this in a generic way?! --> maybe you know?
Thank you in advance,
Norbert
is there a way (generic) to check if a object already exists in the database?
example:
//Signaturepublic bool ObjectExists<T>( T entity );//So when you generate a DbContext you have these possibilities...If( dbContext.ObjectExists<MyDomainClassType>( MyDomainClassType concreteEntity )) return "Yes...!";Now I have no ideas to do this in a generic way?! --> maybe you know?
Thank you in advance,
Norbert