protected override Command CreateDeleteCommand(User entity, IAuthenticatedUser user, string selector) { return(Command .NonQuery() .Connection(RegisterUserConnectionClass.GetConnectionName()) .StoredProcedure("[UserBoundedContext].[pUser_Delete]") .Parameters( p => p.Name("userId").Value(entity.Id) )); }
public User GetUserByUserName(string username) { var result = Query <User> .Single() .Connection(RegisterUserConnectionClass.GetConnectionName()) .StoredProcedure("[UserBoundedContext].[pUser_GetUserByUserName]") .Parameters( p => p.Name("username").Value(username) ) .Execute(); return(result.Record); }
protected override Command CreateInsertCommand(User entity, IAuthenticatedUser user, string selector) { var command = Query <User> .Single() .Connection(RegisterUserConnectionClass.GetConnectionName()) .StoredProcedure("[UserBoundedContext].[pUser_Insert]") .Parameters( p => p.Name("username").Value(entity.Username), p => p.Name("passwordSalt").Value(entity.PasswordSalt), p => p.Name("passwordHash").Value(entity.PasswordHash), p => p.Name("email").Value(entity.Email) ) .RecordInstance(entity) .MapProperties( p => p.Name("Id").Index(0), p => p.Name("SubjectId").Index(1) ); return(command); }
public RegisterUserCommandAggregate(RegisterUserInputDto user, EntityDependency[] dependencies = null) : base(new DomainFramework.DataAccess.RepositoryContext(RegisterUserConnectionClass.GetConnectionName())) { Initialize(user, dependencies); }
public RegisterUserCommandAggregate() : base(new DomainFramework.DataAccess.RepositoryContext(RegisterUserConnectionClass.GetConnectionName())) { }
public GetUserByUserNameQueryAggregate() : base(new DomainFramework.DataAccess.RepositoryContext(RegisterUserConnectionClass.GetConnectionName())) { var context = (DomainFramework.DataAccess.RepositoryContext)RepositoryContext; UserQueryRepository.Register(context); }