public IHttpActionResult Get()
        {
            PhoneService          service = new PhoneService(new BusinessDbContext());
            List <PhoneViewModel> models  = service.GetAll();

            return(Ok(models));
        }
Esempio n. 2
0
        public IHttpActionResult Get()
        {
            PhoneService service = new PhoneService(new BusinessDbContext()); // Make a dbcontex connnection
            List<PhoneViewModel> models = service.GetAll(); 

            return Ok(models);

        }