BurningPlate.Repositories.SqlRestaurantRepository.GetById C# (CSharp) Method

GetById() public method

public GetById ( System.Guid id ) : Restaurant
id System.Guid
return BurningPlate.Models.Restaurant
        public Restaurant GetById(Guid id)
        {
            var results = from r in _context.Restaurants
                          where r.Id == id
                          select new Restaurant
                                     {
                                         Id = r.Id,
                                         Name = r.Name
                                     };

            return results.SingleOrDefault();
        }
    }
SqlRestaurantRepository