Пример #1
0
        public async Task <bool> AddAsync(Core.Entities.RentACar rentACar)
        {
            var r = await context.FindAsync <Core.Entities.RentACar>(rentACar.Id);

            if (r is object)
            {
                return(false);
            }
            await context.AddAsync(rentACar);

            await context.SaveChangesAsync();

            return(true);
        }
Пример #2
0
 public async Task UpdateAsync(Core.Entities.RentACar rentACar)
 {
     context.Update(rentACar);
     await context.SaveChangesAsync();
 }