コード例 #1
0
ファイル: Program.cs プロジェクト: mumby0168/Chat-Application
        static void Main(string[] args)
        {
            var context = new SocketDbContext();

            var user = new SocketUser();

            user.Name  = "Billy Mumby";
            user.Email = "*****@*****.**";

            IPasswordProtectionService passwordProtectionService = new PasswordProtectionService();

            var(password, salt) = passwordProtectionService.Encrypt("Test123");

            user.Password = password;
            user.Salt     = salt;

            context.SocketUsers.Add(user);
            context.SaveChanges();
        }
コード例 #2
0
 public SocketUserRepo(SocketDbContext context) : base(context)
 {
 }
コード例 #3
0
 public RepositoryAsync(SocketDbContext context)
 {
     Context = context;
 }
コード例 #4
0
 public UnitOfWork(SocketDbContext socketDbContext)
 {
     _socketDbContext = socketDbContext;
     SocketUserRepo   = new SocketUserRepo(socketDbContext);
 }
コード例 #5
0
 public Repository(SocketDbContext context) : base(context)
 {
 }