public string Update(int id, string name, string description) { string msg; try { Ethnicity model = service.GetById(id); model.Name = name; model.Description = description; model.ChangedBy = User.Identity.GetUserId(); service.Update(model); msg = "Saved Successfully"; } catch (Exception ex) { msg = "Error occured:" + ex.Message; } return(msg); }
public Ethnicity GetEthnicity(int id) { return(_service.GetById(id)); }