Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@explorer14
Created June 11, 2018 22:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save explorer14/917a3acd8e68b0d6b508508fd3c39136 to your computer and use it in GitHub Desktop.
Save explorer14/917a3acd8e68b0d6b508508fd3c39136 to your computer and use it in GitHub Desktop.
public class CustomerRepository : ICustomerRepository
{
private CRMContext context;
public CustomerRepository(IDbContextFactory dbContextFactory)
{
this.context = dbContextFactory.Create();
}
public IEnumerable GetAllCustomers()
{
return this.context?.Customers.ToList().AsEnumerable();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment