public void Save(MasterLocationType data) { if (data.LocationTypeId == 0) { var institutionId = _securityService.GetCurrentInstitutionId(); data.InstitutionId = institutionId; } _locationTypeRepository.Save(data); _locationTypeRepository.Commit(); }
public IHttpActionResult Delete(MasterLocationType data) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } try { _locationTypeService.Delete(data); return(Ok()); } catch (Exception ex) { return(BadRequest(ex.Message)); } }
public void Delete(MasterLocationType data) { _locationTypeRepository.Delete(data); _locationTypeRepository.Commit(); }