Hi,
I am trying to add a record using DBContext.DBset.AddAsync. This is how my code is:
await _dbContext.myDbSet.AddAsync(myentity);
int result = _dbContext.SaveChanges();
Please note that the datatypes in DBSet, database table and entity passed are in sync.
But the control is getting lost at _dbContext.SaveChanges() and the data is not getting saved in database. Am I doing something wrong?
I am using EF core 3.1.2.
Any help would be appreciated.
Best Regards,
Simpy Sinha