Ejemplo n.º 1
0
 private void CreateTestData()
 {
     for (int i = 1; i <= 50; i++)
     {
         News news = GetNewsRecord(i);
         _newsLogic.SaveNewsRecord(news);
     }
 }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            IKernel kernel = new StandardKernel();

            kernel.Load(Assembly.GetExecutingAssembly());
            INewsLogic newsLogic = kernel.Get <INewsLogic>();

            for (int i = 1; i <= 100; i++)
            {
                News news = GetNewsRecord(newsLogic, i);
                newsLogic.SaveNewsRecord(news);
                Console.WriteLine("Создана запись №{0}", i);
            }
        }
Ejemplo n.º 3
0
 public ActionResult SaveNews(NewsUpdateModel updateModel)
 {
     _newsLogic.SaveNewsRecord(updateModel.ToNewsRecord());
     return(RedirectToAction("Index"));
 }