public string Delete(int id) { var listZoneLocation = _tmsZoneRepository.Find(x => x.ZoneLocationId == id && x.DeleteFlag != DeleteFlg.Delete); if (listZoneLocation.Count() > 0) { return(MessageStatic.HaveChild); } _tmsZoneLocationRepository.Remove(id); SaveChanges(); return(null); }
public List <TMSZoneViewModel> GetAll() { var data = _itmsZoneRepository.Find(x => x.DeleteFlag != DeleteFlg.Delete).ToList(); return(_mapper.Map <List <TMSZone>, List <TMSZoneViewModel> >(data)); }