public async Task <string> AddParkingOrder(ParkingOrderDto parkingOrderDto) { ParkingOrderEntity parkingOrderEntity = new ParkingOrderEntity(parkingOrderDto); await parkingLotContext.ParkingOrders.AddAsync(parkingOrderEntity); await parkingLotContext.SaveChangesAsync(); return(parkingOrderEntity.OrderNumber); }
public async Task <int> AddParkingOrder(ParkingOrderDto parkingOrderDto) { ParkingOrderEntity parkingOrderEntity = new ParkingOrderEntity(parkingOrderDto); await this.parkingOrderContext.ParkingOrder.AddAsync(parkingOrderEntity); await this.parkingOrderContext.SaveChangesAsync(); return(parkingOrderEntity.Id); }