Beispiel #1
0
        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();
        }
 public SocketUserRepo(SocketDbContext context) : base(context)
 {
 }
Beispiel #3
0
 public RepositoryAsync(SocketDbContext context)
 {
     Context = context;
 }
Beispiel #4
0
 public UnitOfWork(SocketDbContext socketDbContext)
 {
     _socketDbContext = socketDbContext;
     SocketUserRepo   = new SocketUserRepo(socketDbContext);
 }
Beispiel #5
0
 public Repository(SocketDbContext context) : base(context)
 {
 }