Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. public async Task<ParagemRegisto> GetParagemRegistoOnGoingAsync(int registoId)
  2. {
  3. return await = _context.ParagensRegistos
  4. .Where(pr => pr.RegistoId == registoId && pr.HoraFim == null)
  5. .FirstAsync();
  6. }
  7.  
  8. public async Task<ParagemRegisto> GetParagemRegistoOnGoingAsync(int registoId)
  9. {
  10. var result = await _context.ParagensRegistos
  11. .Where(pr => pr.RegistoId == registoId && pr.HoraFim == null)
  12. .FirstOrDefaultAsync();
  13.  
  14. return result ?? new List<ParagemRegisto>();
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement