Example #1
0
 public List <CoreApi.Models.User> RetrieveAll()
 {
     Data.TestEntities testEntities = new Data.TestEntities();
     return(testEntities.User.Select(x => new CoreApi.Models.User
     {
         FirstName = x.FirstName,
         LastName = x.LastName,
         Id = x.Id
     }).ToList());
 }
Example #2
0
 public User RetrieveById(int id)
 {
     Data.TestEntities testEntities = new Data.TestEntities();
     return(testEntities.User.Where(x => x.Id == id).FirstOrDefault());
 }