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; }
public Cafe Post(CreateCafeRequest request) { var cafeCtr = new CafeCtr(); var adminData = new Administrator { ID = request.AdminID }; 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, Admin = adminData }; cafeCtr.CreateCafe(cafeData); return(cafeData); }