/// <summary> /// check ward is exist /// </summary> /// <param name="entity">ward information</param> /// <returns></returns> public bool ContainWith(Ward entity, bool isDelete = false) { var result = _wardRepository.GetAll().Where(x => entity.Name.ToUpper() == x.Name.ToUpper() && entity.DistrictID == x.DistrictID && x.IsDelete == isDelete ); return(result.SingleOrDefault() != null); }
public IEnumerable <Ward> GetAllWard() { List <Ward> lstward = new List <Ward>(); try { lstward = _wardRepository.GetAll().ToList(); } catch (Exception ex) { string FunctionName = string.Format("GetAllWard('{0}')"); Common.Logs.LogCommon.WriteError(ex.ToString(), FunctionName); return(null); } return(lstward); }
public IEnumerable <WardDTO> GetAllWard() { IEnumerable <Ward> list = wardRepository.GetAll(); return(list.MappingWardDtos()); }