//[Route("api/values/getAll/")] public IEnumerable <product> GetAll() { DataContext store = new DataContext(@"Data Source=localhost\SQLEXPRESS01;database=store;Integrated Security = True;"); Table <Instruments> instruments = store.GetTable <Instruments>(); dbwork obj = new dbwork(); int i = 0; IEnumerable <product> list = obj.getdb(i); return(list); }