public SigmaUser Generate()
 {
     var user = new SigmaUser
     {
         Email = Email,
         Name = Name,
         Password = Password,
         UserName = UserName
     };
     return user;
 }
Esempio n. 2
0
 public async Task<QueryResult> DeleteUser(SigmaUser user, CancellationToken cancellationToken)
 {
     Handle(cancellationToken);
     if (user == null)
         throw new ArgumentNullException(nameof(user));
     if (string.IsNullOrEmpty(user.Id))
         throw new InvalidOperationException(nameof(user));
     var count = await Connection.ExecuteAsync($"DELETE FROM {Table} WHERE Id=@Id", new
     {
         user.Id
     });
     return QueryResult.Success(count);
 }