I am implementing the IRepository interface against an Oracle database.
public interface IDinnerRepository {
IQueryable<Dinner> FindAllDinners();
IQueryable<Dinner> FindByLocation(float latitude, float longitude);
IQueryable<Dinner> FindUpcomingDinners();
Dinner GetDinner(int id);
void Add(Dinner dinner);
void Delete(Dinner dinner);
void Save();
}
How should I implement the Save method? If I was working with Linq2Sql I would create a database context and then call SubmitChanges on the database context. How can I implement the same functionality with an Oracle back end?
/// <summary>
/// Database context
/// </summary>
private DBDataContext db = new DBDataContext();
public void Save()
{
this.db.SubmitChanges();
}
Thanks!