public ApiResult UpdateEneity([FromBody] DTO.HospitalDto requst) { bll = new BLL.HospitalService(CurrentOperatorUserID, CurrentOperatorOrgID); var model = requst.Map <DTO.HospitalDto, Entity.Hospital>(); return(bll.Update(model).ToApiResultForBoolean()); }
public ApiResult InsertEntity([FromBody] DTO.HospitalDto requst) { bll = new BLL.HospitalService(CurrentOperatorUserID, CurrentOperatorOrgID); var model = requst.Map <DTO.HospitalDto, Entity.Hospital>(); if (bll.Insert(model)) { return(model.HospitalID.ToApiResultForObject()); } else { return(EnumApiStatus.BizError.ToApiResultForApiStatus()); } }