Skip to content

Instantly share code, notes, and snippets.

View annielagang's full-sized avatar

Annielyn May Lagang annielagang

  • Cavite, Philippines
View GitHub Profile
@annielagang
annielagang / BaseRepository.cs
Created September 26, 2023 06:46 — forked from pmbanugo/BaseRepository.cs
Implementation of the Repository and UnitOfWork pattern using Entity Framework.
// License: Apache 2.0
// A generic base repository which other repositories (if needed) can inherit from
public class BaseRepository<TEntity> : IEntityRepository<TEntity> where TEntity : class
{
internal DataContext context;
internal DbSet<TEntity> dbSet;
public BaseRepository(DataContext context)
{