// GET: Admin public ActionResult Index() { using (AutoInsuranceEntities db = new AutoInsuranceEntities()) { var quotes = db.QuoteInfoes; var quotesVms = new List <QuotesVm>(); foreach (var quote in quotes) { var quoteVm = new QuotesVm(); quoteVm.FirstName = quote.FirstName; quoteVm.LastName = quote.LastName; quoteVm.EmailAddress = quote.EmailAddress; quotesVms.Add(quoteVm); } return(View(quotesVms)); } }
// GET: Admin public ActionResult Index() { using (InsuranceQuotesEntities1 db = new InsuranceQuotesEntities1()) { var applications = db.Applications.ToList(); var applicationsVms = new List <QuotesVm>(); foreach (var application in applications) { var quotesVm = new QuotesVm(); quotesVm.FirstName = application.FirstName; quotesVm.LastName = application.LastName; quotesVm.EmailAddress = application.EmailAddress; quotesVm.Quote = (decimal)application.Quote; applicationsVms.Add(quotesVm); } return(View(applicationsVms)); } }