Skip to content

Instantly share code, notes, and snippets.

@Kazuki-Kachi
Created December 17, 2015 16:19
Show Gist options
  • Save Kazuki-Kachi/0a46503990d2528976a6 to your computer and use it in GitHub Desktop.
Save Kazuki-Kachi/0a46503990d2528976a6 to your computer and use it in GitHub Desktop.
For blog2 Sample
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Sample
{
class Entity
{
public int Id { get; set; }
public DateTime? Registered { get; set; }
}
class User : Entity
{
public string Name { get; set; }
public string EMail { get; set; }
}
interface IRepository<TEntity> where TEntity : Entity
{
TEntity Get();
}
class UserRepository : IRepository<User>
{
public User Get() => new User();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment