Ejemplo n.º 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));
     }
 }
Ejemplo n.º 2
0
 public async Task <int> GetDataCount()
 {
     using (var standardCategoryDao = new StandardCategoryDao())
     {
         return(await standardCategoryDao.GetAllAsync().CountAsync());
     }
 }
Ejemplo n.º 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());
     }
 }