Ejemplo n.º 1
0
 public async Task <bool> ExistsInStorage(Guid inStorageId)
 {
     using (IDAL.Master.IInStorageDao inStorageDao = new InStorageDao())
     {
         return(await inStorageDao.GetAllAsync().AnyAsync(m => m.Id == inStorageId));
     }
 }
Ejemplo n.º 2
0
 public async Task <int> GetDataCount()
 {
     using (var inStorageDao = new InStorageDao())
     {
         return(await inStorageDao.GetAllAsync().CountAsync());
     }
 }
Ejemplo n.º 3
0
 public async Task <DTO.Master.InStorageDto> GetOneInStorageById(Guid inStorageId)
 {
     using (IDAL.Master.IInStorageDao inStorageDao = new InStorageDao())
     {
         return(await inStorageDao.GetAllAsync()
                .Where(m => m.Id == inStorageId)
                .Select(m => new DTO.Master.InStorageDto()
         {
             Code = m.Code,
             Name = m.Name,
             Category = m.Category,
             Describe = m.Describe,
             CreateTime = m.CreateTime,
         }).FirstAsync());
     }
 }