Esempio n. 1
0
 public static Task <Guest> Guest_ById(this DomainContext db, Guid id)
 => db.Guests.Include(x => x.Barrier).FirstOrDefaultAsync(x => x.Id == id);
Esempio n. 2
0
 public static async Task <User> GetUserByNumber(this DomainContext db, string number)
 {
     return(await db.Users.Include(y => y.Barriers).FirstOrDefaultAsync(u => u.Number == number));
 }
Esempio n. 3
0
 public static async Task <Barrier> GetBarrierById(this DomainContext db, int id)
 {
     return(await db.Barriers.FirstOrDefaultAsync(b => b.Id == id));
 }
Esempio n. 4
0
 public static async Task <User> GetUserByToken(this DomainContext db, Guid token)
 {
     return(await db.Users.Include(y => y.Barriers).FirstOrDefaultAsync(u => u.Token == token));
 }