public ManaDbUser(ManaUser model) { if (model == null) { throw new ArgumentException(nameof(model)); } Id = model.Id; Email = model.Email; PasswordHash = model.PasswordHash; }
public async Task UpdateUser(ManaUser user) { try { using (var connection = await GetConnectionAsync()) { await connection.ExecuteAsync(ManagementQueries.UserUpdate, user); } } catch (Exception e) { if (e is RecordNotFoundException) { throw; } throw new Exception("Could not update Mana User"); } }
public async Task <ManaUser> CreateUser(ManaUser user) { try { using (var connection = await GetConnectionAsync()) { var dbModel = new ManaDbUser(user); await connection.ExecuteAsync(ManagementQueries.UserCreate, dbModel); return(user); } } catch (Exception e) { if (e is RecordNotFoundException) { throw; } throw new Exception("Could not get create Mana User"); } }
public SingleManaUserResponse(ManaUser user) { Id = user.Id; Email = user.Email; }
public ManaAuthUser(ManaUser user) { Id = user.Id; Email = user.Email; PasswordHash = user.PasswordHash; }