Exemplo n.º 1
0
 public async Task <bool> ExistsContribute(Guid id)
 {
     using (IDAL.Master.IContributeDao materialDao = new ContributeDao())
     {
         return(await materialDao.GetAllAsync().AnyAsync(m => m.Id == id));
     }
 }
Exemplo n.º 2
0
 public async Task <int> GetDataCount()
 {
     using (var contributeDao = new ContributeDao())
     {
         return(await contributeDao.GetAllAsync().CountAsync());
     }
 }
Exemplo n.º 3
0
 public async Task <ContributeDto> GetOneContributeById(Guid contributeId)
 {
     using (IDAL.Master.IContributeDao contributeDto = new ContributeDao())
     {
         return(await contributeDto.GetAllAsync()
                .Where(m => m.Id == contributeId)
                .Select(m => new DTO.Master.ContributeDto()
         {
             Id = m.Id,
             AddPointProject = m.AddPointProject,
             AddPointContent = m.AddPointContent,
             AddPointMethod = m.AddPointMethod,
             SelfPoint = m.SelfPoint,
             SelfReason = m.SelfReason,
             AuditPoint = m.AuditPoint,
             CreateTime = m.CreateTime,
         }).FirstAsync());
     }
 }