Exemple #1
0
 // GET: api/Categories/5
 public Categories Get(int id)
 {
     using (mydbformobileEntities1 entities = new mydbformobileEntities1())
     {
         return(entities.Categories.FirstOrDefault(e => e.Id == id));
     }
 }
Exemple #2
0
 // GET: api/Categories
 public IEnumerable <Categories> Get()
 {
     using (mydbformobileEntities1 entities = new mydbformobileEntities1())
     {
         return(entities.Categories.ToList());
     }
 }