Ejemplo n.º 1
0
        public ActionResult CreateNewspaper(DateTime?issueDate)
        {
            DateTime dateToUse = issueDate == null ? DateTime.Today.Date : (DateTime)issueDate;

            var newPaper = new Newspaper(dateToUse, reader.GetMaxId());

            newspapers.Add(newPaper);
            writer.SaveNewNewspaper(newPaper);
            return(RedirectToAction("Index"));
        }