public async Task <bool> ExistsInStorage(Guid inStorageId) { using (IDAL.Master.IInStorageDao inStorageDao = new InStorageDao()) { return(await inStorageDao.GetAllAsync().AnyAsync(m => m.Id == inStorageId)); } }
public async Task <int> GetDataCount() { using (var inStorageDao = new InStorageDao()) { return(await inStorageDao.GetAllAsync().CountAsync()); } }
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()); } }