public IActionResult Index() { ViewBag.TestData = _testService.Test(); ViewBag.AnotherTestData = _anotherTestService.Test(); //Container c = new Container(); //c.WhatDoIHave(); var x = _Container.GetInstance <ITestService>(); IRepository <Sample> _sampleRepository = _Container.GetInstance <IRepository <Sample> >(); if (null == _sampleRepository) { return(View()); } var sample = new Sample { Name = "Name test", Description = "Decription Test" }; _sampleRepository.Add(sample); _sampleRepository.SaveChange(); return(View()); }
public IActionResult Index() { ViewBag.TestData = _testService.Test(); ViewBag.AnotherTestData = _anotherTestService.Test(); var sample = new Sample { Name = "Name test", Description = "Decription Test" }; _sampleRepository.Add(sample); _sampleRepository.SaveChange(); var model = new TestViewModel { Name = sample.Name, Description = sample.Description }; return(View(model)); }
public IActionResult Index() { string xccx = _sdata.PruebaC1(); //_EMAIL.SendEmailAsync("", "", "", false); //var tModel = new TestModels { Text = "Decription X" }; //_testModel.Add(tModel); //_testModel.SaveChange(); string xX = _httpcontext.HttpContext.Session.GetString("hola"); TestModels m = new TestModels(); m.IdTest = 123123; var xx = _testModel.Query(); ViewBag.AnotherTestData = _anotherTestService.Test() + " " + xx.Count(); return(View(m)); }
public IActionResult Index() { ViewBag.TestData = _testService.Test(); ViewBag.AnotherTestData = _anotherTestService.Test(); return(View()); }