Skip to content

Instantly share code, notes, and snippets.

@gmartinezsan
Last active April 17, 2018 02:01
Show Gist options
  • Save gmartinezsan/322d9c15a781d4f4d006583c19909e90 to your computer and use it in GitHub Desktop.
Save gmartinezsan/322d9c15a781d4f4d006583c19909e90 to your computer and use it in GitHub Desktop.
using BooksWebApi.Entities;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace BooksWebApi.Repository
{
public interface ICrudRepository
{
void Add<T>(T entity) where T : class;
void Delete<T>(T entity) where T : class;
Task<bool> SaveAllAsync();
IEnumerable<Book> GetBooks();
Book GetBook(int id);
IEnumerable<Book> GetBooksByCategory(string category);
Category GetCategoryWithBooks(int id);
User GetUser(string userName);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment