Skip to main content

Posts

Showing posts from November, 2019

Debug Entity Validation Exception C#

      Try this try and cath. put your SaveChanges() method inside the try block.             try             {                 db.tbl_Payroll_full_day_leaves.Add(tbl_Payroll_Leaves);                 if (0 < db.SaveChanges())                 {                     return true;                 }                 else                 {                     return false;                 }             }             catch (DbEntityValidationException e)       ...