-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Hello, I have the following codes.
using (var dbContext = GetDbContext())
{
dbContext.Set<TEntity>().Attach(entity);
dbContext.Entry(entity).State = EntityState.Modified;
try
{
dbContext.SaveChanges();
return true;
}
catch (DbUpdateConcurrencyException dbEx)
{
// Handling exception
return false;
}
}
Based on your sharing, I already know how to Mock Attach the method, but there is no handling for setting the dbContext.Entry(entity).State property. Can you give me a suggestion?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels