Hello,
Direct error. I have a ViewModel class called StoreLocationViewModel. Here is the definition.
Inside the Controller I'm trying to initialize the ViewModel
- public async Task
Index() - {
- var viewModel = new StoreLocationViewModel();
- viewModel.Stores = _context.Stores;
Cannot implicitly convert type 'Microsoft.EntityFrameworkCore.DbSet' into 'Applications.Models.Store'.
This is the first time encountering this error and it's too specific in order to find documentation online. Can someone please explain me what does it mean?. Thanks in advance!
Luis Alberto Delgado de la FlorPosted Jun 23, 2017, 4:28 PM
Luis Alberto Delgado de la FlorPosted Jun 23, 2017, 2:01 PM
Ramesh BarikPosted Jun 23, 2017, 5:20 AM