Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public IQueryable<Restaurant> All()
- {
- return from r in _context.Restaurants select new Restaurant(r.Id)
- {
- Name = r.Name
- };
- }
- var results = Repository.All().Where(r => r.Name == "BW<3").ToList();
- var results = Repository.All().Where(r => r.Id == new Guid("088ec7f4-63e8-4e3a-902f-fc6240df0a4b")).ToList();
- The member 'BurningPlate.Models.Restaurant.Id' has no supported translation to SQL.
- return from r in _context.Restaurants select new Restaurant()
- {
- Id=r.Id,
- Name = r.Name
- };
Add Comment
Please, Sign In to add comment