public Table Post(TableRequestPP request) { var tableCtr = new TableCtr(); var tableData = new Table { ID = request.ID, NoOfSeats = request.NoOfSeats, TableNumber = request.TableNumber }; var requestPP = new CafeRequestPP(); var cafeData = new Cafe { ID = requestPP.ID, Name = requestPP.Name, Address = requestPP.Address, PriceRange = requestPP.PriceRange, Rating = requestPP.Rating, OpenTime = requestPP.OpenTime, CloseTime = requestPP.CloseTime, ZipID = requestPP.ZipID, TypeID = requestPP.TypeID }; tableCtr.CreateTable(tableData, cafeData); return(tableData); }
public Cafe Post(CafeRequestPP request) { var cafeCtr = new CafeCtr(); var cafeData = new Cafe { Name = request.Name, Address = request.Address, PriceRange = request.PriceRange, Rating = request.PriceRange, OpenTime = request.OpenTime, CloseTime = request.CloseTime, ZipID = request.ZipID, TypeID = request.TypeID }; cafeCtr.CreateCafe(cafeData); return cafeData; }