I am trying to Implement a Generic Repository with Linq To SQL. My problem lies in that some of my underlying tables have int ID’s and some Guid ID’s. How would I account for that?
public T GetById(int id)
{
return this._context.GetTable<T>().Single(x => x.ID.Equals(id));
}
Add another generic parameter to the repository interface.
Then implement it.