14 lines
296 B
C#
14 lines
296 B
C#
namespace DanieleMarotta.RiversongCodeShowcase
|
|
{
|
|
public class Entity
|
|
{
|
|
public const int InvalidId = 0;
|
|
|
|
public int Id { get; private set; }
|
|
|
|
public static T Create<T>(int id) where T : Entity, new()
|
|
{
|
|
return new T { Id = id };
|
|
}
|
|
}
|
|
} |