private static MySpaceBooking CreateMySpace(MySpaceBookingRequest request) { return(new MySpaceBooking { FirstName = request.FirstName, LastName = request.LastName, Email = request.Email, Date = request.Date }); }
public MySpaceBookingResult BookMySpace(MySpaceBookingRequest request) { if (request == null) { throw new ArgumentNullException(nameof(request)); } _mySpaceRepository.Save(CreateMySpace(request)); return(new MySpaceBookingResult { FirstName = request.FirstName, LastName = request.LastName, Email = request.Email, Date = request.Date }); }