public async Task <string> AddParkingLotAsync(ParkingLotDto parkingLotDto) { var parkingLotEntity = new ParkingLotEntity() { Name = parkingLotDto.Name, Capacity = parkingLotDto.Capacity.HasValue ? parkingLotDto.Capacity.Value : 0, Location = parkingLotDto.Location, }; await parkingLotDbContext.AddAsync(parkingLotEntity); await parkingLotDbContext.SaveChangesAsync(); return(parkingLotEntity.Name); }
public async Task <Data.Vehicle> Create(Data.Vehicle entity) { await _context.AddAsync(entity); return(entity); }
public async Task <Data.Establishment> Create(Data.Establishment entity) { await _context.AddAsync(entity); return(entity); }