コード例 #1
0
ファイル: CafeService.cs プロジェクト: tayduivn/Archived
 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;
 }
コード例 #2
0
ファイル: CafeService.cs プロジェクト: tayduivn/Archived
        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);
        }