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

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

            return Ok(models);

        }