Created
December 30, 2016 20:48
-
-
Save trevorchunestudy/e736d1e2b5ee9fcd56029e87bccf8712 to your computer and use it in GitHub Desktop.
Basic DDD entity
This file contains hidden or 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.ComponentModel.DataAnnotations; | |
| namespace LMS.Core.Domain.Management | |
| { | |
| public class User : Entity | |
| { | |
| private User(string authId) | |
| { | |
| AuthId = authId; | |
| } | |
| //Needed for EF | |
| private User () { } | |
| [MaxLength(100)] | |
| public string AuthId { get; private set; } | |
| public User Create(string authId) | |
| { | |
| return new User(authId); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment