예제 #1
0
 public async Task <bool> ExistsStandardCategory(Guid standardCategoryId)
 {
     using (IDAL.Master.IStandardCategoryDao standardCategoryDao = new StandardCategoryDao())
     {
         return(await standardCategoryDao.GetAllAsync().AnyAsync(m => m.Id == standardCategoryId));
     }
 }
예제 #2
0
 public async Task <int> GetDataCount()
 {
     using (var standardCategoryDao = new StandardCategoryDao())
     {
         return(await standardCategoryDao.GetAllAsync().CountAsync());
     }
 }
예제 #3
0
 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());
     }
 }