public bool PostServiceCategory(ServiceCategory s) { try { Service_Category a = new Service_Category(); a.Service_Category_ID = s.Service_Category_ID; a.Service_Category1 = s.Service_Category; var res = es.Service_Category.Add(a); if (res != null) { return(true); } return(false); } catch (Exception ex) { throw ex; } }
public bool PostServiceCategory(ServiceCategory s) { try { Service_Category a = new Service_Category(); a.Service_Category1 = s.Service_Category; es.Service_Category.Add(a); var res = es.SaveChanges(); if (res > 0) { return(true); } return(false); } catch (Exception ex) { throw ex; } }