public ReviewWeb(Review reviewLib, RestaurantWeb owner) { Id = reviewLib.id; ReviewerName = reviewLib.name; Rating = (float)reviewLib.rating; Comment = reviewLib.comment; DateTime = reviewLib.dateTime; Restaurant = owner; }
public static RestaurantWeb GetById(this List <RestaurantWeb> list, int id) { RestaurantWeb target = null; foreach (var currentRest in list) { if (currentRest.Id == id) { target = currentRest; break; } } return(target); }