Skip to content

Instantly share code, notes, and snippets.

@rohansen
Created March 27, 2018 07:57
Show Gist options
  • Save rohansen/c9b9c373a9f1151b68cd2cc31066642e to your computer and use it in GitHub Desktop.
Save rohansen/c9b9c373a9f1151b68cd2cc31066642e to your computer and use it in GitHub Desktop.
public interface ICRUD<T>
{
void Create(T entity);
T Get(int id);
IEnumerable<T> GetAll();
void Update(T entity);
void Delete(int id);
}
public class GamePlayer
{
public int Id { get; set; }
public string PlayerName { get; set; }
public int Highscore { get; set; }
}
public class DbGamePlayer : ICRUD<GamePlayer>
{
public void Create(GamePlayer entity)
{
throw new NotImplementedException();
}
public IEnumerable<GamePlayer> GetAll()
{
throw new NotImplementedException();
}
public void Delete(int id)
{
throw new NotImplementedException();
}
public GamePlayer Get(int id)
{
throw new NotImplementedException();
}
public void Update(GamePlayer entity)
{
throw new NotImplementedException();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment