Пример #1
0
        public IActionResult Index()
        {
            List <Customer> customers = new List <Customer>();

            customers = context.GetAllCustomers().ToList();

            return(View(customers));
        }
        public ActionResult GetAll()
        {
            CustomerContext context = HttpContext.RequestServices.GetService(typeof(CustomerContext)) as CustomerContext;

            return(Ok(context.GetAllCustomers()));
        }