Created
December 17, 2015 16:19
-
-
Save Kazuki-Kachi/0a46503990d2528976a6 to your computer and use it in GitHub Desktop.
For blog2 Sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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