public async Task <bool> ExistsStandardCategory(Guid standardCategoryId) { using (IDAL.Master.IStandardCategoryDao standardCategoryDao = new StandardCategoryDao()) { return(await standardCategoryDao.GetAllAsync().AnyAsync(m => m.Id == standardCategoryId)); } }
public async Task <int> GetDataCount() { using (var standardCategoryDao = new StandardCategoryDao()) { return(await standardCategoryDao.GetAllAsync().CountAsync()); } }
public async Task <DTO.Master.StandardCategoryDto> GetOneStandardCategoryById(Guid id) { using (IDAL.Master.IStandardCategoryDao standardCategoryDao = new StandardCategoryDao()) { return(await standardCategoryDao.GetAllAsync() .Where(m => m.Id == id) .Select(m => new DTO.Master.StandardCategoryDto() { Name = m.Name, CategoryCode = m.CategoryCode, CreateTime = m.CreateTime, }).FirstAsync()); } }