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); }
public async Task <bool> AddAsync(Branch branch) { var b = await context.FindAsync <Branch>(branch.Id); if (b is object) { return(false); } await context.AddAsync(branch); await context.SaveChangesAsync(); return(true); }
public async Task <bool> AddAsync(Car car) { var c = await context.FindAsync <Car>(car.Id); if (c is object) { return(false); } await context.AddAsync(car); await context.SaveChangesAsync(); return(true); }