Пример #1
0
        public void Post([FromBody] BagtotheFutureEntryModel model)
        {
            if (common.Now >= new DateTime(2017, 7, 20))
            {
                throw new BagtotheFutureServiceException("400", "접수가 마감되었습니다.", model);
            }
            var entry = mapperConfig.CreateMapper().Map <BagtotheFutureEntry>(model);

            entry.IpAddress  = common.IpAddress;
            entry.Channel    = HttpContext.Current.Request.Browser.IsMobileDevice ? "mobile" : "web";
            entry.CreateDate = common.Now;
            service.CreateBagtotheFutureEntry(entry);
        }