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);
        }
Пример #2
0
 public Ethnicity GetEthnicity(int id)
 {
     return(_service.GetById(id));
 }