public News CreateNew(ListNewsModel model)
 {
     var singleNew = Mapper.Map<ListNewsModel, News>(model);
     singleNew = FillingTheNewswithExtraData(singleNew);
     singleNew.SubversionId = NoSubversionNumber;
     return singleNew;
 }
 public ActionResult Edit(ListNewsModel model)
 {
     var theNew = CreateNew(model);
     theNew.SubversionId = model.Id;
     theNew =_writeOnlyRepository.Create(theNew);
     var theOldNew = ChangeNewtoOldNotices(model.Id,theNew.Id);
     _writeOnlyRepository.Update(theOldNew);
     theNew.CommentsEnabled = theOldNew.CommentsEnabled;
     _writeOnlyRepository.Update(theNew);
        return RedirectToAction("AdminCp", "Administrator");
 }
 public ActionResult PostNews(ListNewsModel model)
 {
     var singleNew = CreateNew(model);
     singleNew =_writeOnlyRepository.Create(singleNew);
     var nuevoregistrodeOrden = new NewsListOrder();
     nuevoregistrodeOrden.NewId = singleNew.Id;
     nuevoregistrodeOrden.NumberInLine = _readOnlyRepository.GetAll<NewsListOrder>().ToList().Count;
     _writeOnlyRepository.Create(nuevoregistrodeOrden);
     return RedirectToAction("AdminCp");
 }