public async Task <ApplicationCore.Models.Response.BookingsHistory> GetById(int id) { var book = await _bookingsHistoryRepository.GetByIdAsync(id); ApplicationCore.Models.Response.BookingsHistory bookings = new ApplicationCore.Models.Response.BookingsHistory() { Id = book.Id, Email = book.Email, BookingDate = book.BookingDate, BookingTime = book.BookingTime, FromPlace = book.FromPlace, ToPlace = book.ToPlace, PickupAddress = book.PickupAddress, LandMark = book.LandMark, PickupDate = book.PickupDate, PickupTime = book.PickupTime, CabTypesId = book.CabTypeId, ContactNo = book.ContactNo, Status = book.Status, Charge = book.Charge, Feedback = book.Feedback, Comp_time = book.Comp_time //Places = book.Places, //CabTypes = book.CabTypes }; return(bookings); }
public async Task <ApplicationCore.Models.Response.BookingsHistory> Edit(ApplicationCore.Models.Request.BookingsHistory request) { BookingsHistory entity = new BookingsHistory() { Id = request.Id, Email = request.Email, BookingDate = request.BookingDate, BookingTime = request.BookingTime, FromPlace = request.FromPlace, ToPlace = request.ToPlace, PickupAddress = request.PickupAddress, LandMark = request.LandMark, PickupDate = request.PickupDate, PickupTime = request.PickupTime, CabTypeId = request.CabTypesId, ContactNo = request.ContactNo, Status = request.Status, Charge = request.Charge, Feedback = request.Feedback, Comp_time = request.Comp_time }; var book = await _bookingsHistoryRepository.UpdateAsync(entity); ApplicationCore.Models.Response.BookingsHistory bookings = new ApplicationCore.Models.Response.BookingsHistory() { Id = book.Id, Email = book.Email, BookingDate = book.BookingDate, BookingTime = book.BookingTime, FromPlace = book.FromPlace, ToPlace = book.ToPlace, PickupAddress = book.PickupAddress, LandMark = book.LandMark, PickupDate = book.PickupDate, PickupTime = book.PickupTime, CabTypesId = book.CabTypeId, ContactNo = book.ContactNo, Status = book.Status, Charge = book.Charge, Feedback = book.Feedback, Comp_time = book.Comp_time }; return(bookings); }