Exemplo n.º 1
0
 private static RepositoryEntityTable EntitiesFromClientDto(ClientRollDTO roll) =>
 new RepositoryEntityTable
 {
     Rows = roll.AssociatedEntities.Select(a => new RepositoryEntity {
         PublicId = a
     })
 };
Exemplo n.º 2
0
 private static RepositoryDieRollTable MultiDiceFromClientDto(ClientRollDTO roll) =>
 new RepositoryDieRollTable
 {
     Rows = roll.RollValues.Select(typeGroup =>
                                   typeGroup.Values.Select(v =>
                                                           new RepositoryDieRoll
     {
         NumberOfSides = typeGroup.DieType,
         Value         = v
     }))
            .SelectMany(s => s)
 };
Exemplo n.º 3
0
        public async Task <ActionResult> Post([FromBody] ClientRollDTO roll)
        {
            await _repository.InsertRollAsync(roll);

            return(Ok());
        }
 public async Task InsertRollAsync(ClientRollDTO roll) =>
 await _utility.InsertRollAsync <MiscellaneousRollRepositoyDto>("[Rolls].[Sto_InsertMiscellaneousRoll]", roll);
 public async Task InsertRollAsync <T>(string procedureName, ClientRollDTO roll) where T : BaseRollRepositoryDto
 {
     using var connection = _connectionFactory.GetWriteConnection();
     await connection.QueryAsync(procedureName, _mapper.Map <T>(roll), commandType : CommandType.StoredProcedure);
 }
 public async Task InsertRollAsync(ClientRollDTO roll) =>
 await _utility.InsertRollAsync <AttackRollRepositoryDto>("[Rolls].[Sto_InsertAttackRoll]", roll);
Exemplo n.º 7
0
 public async Task InsertRollAsync(ClientRollDTO roll) =>
 await _utility.InsertRollAsync <InitiativeRollRepositoryDto>("[Rolls].[Sto_InsertInitiativeRoll]", roll);
Exemplo n.º 8
0
 private static RepositoryRollCommentTable RollCommentsFromClientDto(ClientRollDTO roll) =>
 new RepositoryRollCommentTable();
Exemplo n.º 9
0
 private static RepositoryRollModifier ModifierFromClientDto(ClientRollDTO roll) =>
 new RepositoryRollModifier
 {
     Value = roll.Modifier
 };
Exemplo n.º 10
0
 private static RepositoryDieRoll SingleDieRollFromClientDto(ClientRollDTO roll, int sides) =>
 new RepositoryDieRoll
 {
     NumberOfSides = sides,
     Value         = roll.RollValue
 };
Exemplo n.º 11
0
 public async Task InsertRollAsync(ClientRollDTO roll) =>
 await _utility.InsertRollAsync <SavingThrowRepositoryDto>("[Rolls].[Sto_InsertSavingThrow]", roll);