Skip to content

Instantly share code, notes, and snippets.

@enisn
Last active January 15, 2022 12:14
Show Gist options
  • Save enisn/3eac15e6761ee13719b217c8c7f36ca4 to your computer and use it in GitHub Desktop.
Save enisn/3eac15e6761ee13719b217c8c7f36ca4 to your computer and use it in GitHub Desktop.
Mastering at Source Generatos - IRepository anatomy
namespace Awesome.Api.Data;
public interface IRepository<TModel>
where TModel : class, IIdentifiable
{
Task<List<TModel>> GetListAsync();
Task<TModel> GetSingleAsync(Guid id);
Task InsertAsync(TModel model);
Task UpdateAsync(Guid id, TModel model);
Task DeleteAsync(Guid id);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment