コード例 #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());
     }
 }