예제 #1
0
        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);
        }
예제 #2
0
 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;
 }