Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public async Task<ParagemRegisto> GetParagemRegistoOnGoingAsync(int registoId)
- {
- return await = _context.ParagensRegistos
- .Where(pr => pr.RegistoId == registoId && pr.HoraFim == null)
- .FirstAsync();
- }
- public async Task<ParagemRegisto> GetParagemRegistoOnGoingAsync(int registoId)
- {
- var result = await _context.ParagensRegistos
- .Where(pr => pr.RegistoId == registoId && pr.HoraFim == null)
- .FirstOrDefaultAsync();
- return result ?? new List<ParagemRegisto>();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement