public ActionResult AddContent(Content p) { string mailAccount = (string)Session["WriterMail"]; var writerIdInfo = c.Writers.Where(x => x.WriterMail == mailAccount).Select(y => y.WriterId).FirstOrDefault(); p.ContentDate = DateTime.Parse(DateTime.Now.ToShortDateString()); p.WriterId = writerIdInfo; p.ContentStatus = true; cm.ContentAddBl(p); return(RedirectToAction("MyContent")); }