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);
        }
Ejemplo n.º 2
0
        public async Task <ResponseModel> Update([FromBody] EthnicityModel model)
        {
            var response = await _nationService.Update(model);

            return(response);
        }