예제 #1
0
        public Poll CreatePoll(string shopId)
        {
            var  shop    = dac.GetShop(x => x._id == shopId);
            Poll newpoll = new Poll
            {
                _id        = Guid.NewGuid().ToString(),
                ShopId     = shop._id,
                CloseDate  = null,
                CreateDate = DateTime.UtcNow,
                Orders     = new List <Order>(),
                DeleteDate = null
            };

            dac.CreatePoll(newpoll);

            return(newpoll);
        }