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

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

            return Ok(models);

        }