// GET: /<controller>/ public IActionResult Index() { IBotRepository _botRepositorio; //IBotViewModelRepository _casa; //_casa = new BotViewModelRepositorio(); Bot diego = new Bot() { BotId = 1, BotNome = "f" }; _botRepositorio = new BotRepository(); var a = _botRepositorio.GetAllEntity(); List <BotViewModel> ListabotVM = new List <BotViewModel>(); foreach (var item in a) { BotViewModel botvm = new BotViewModel { BotId = item.BotId }; ListabotVM.Add(botvm); } // _botRepositorio.Insert(diego); //_botRepositorio.Save(); // _botRepositorio.Update() // _botRepositorio.Update(diego); // _botRepositorio.Save(); // var g= _botRepositorio.GetEntityByID(1); // _botRepositorio.Delete(n => n.BotId == diego.BotId); // _botRepositorio.Save(); //Database.SqlQuery<Bot>("exec GetCoursesByStudentId").ToList<Bot>(); //var b = _botRepositorio.GetAllEntity(); return(View()); }