コード例 #1
0
 private static RepositoryEntityTable EntitiesFromClientDto(ClientRollDTO roll) =>
 new RepositoryEntityTable
 {
     Rows = roll.AssociatedEntities.Select(a => new RepositoryEntity {
         PublicId = a
     })
 };
コード例 #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)
 };
コード例 #3
0
        public async Task <ActionResult> Post([FromBody] ClientRollDTO roll)
        {
            await _repository.InsertRollAsync(roll);

            return(Ok());
        }
コード例 #4
0
 public async Task InsertRollAsync(ClientRollDTO roll) =>
 await _utility.InsertRollAsync <MiscellaneousRollRepositoyDto>("[Rolls].[Sto_InsertMiscellaneousRoll]", roll);
コード例 #5
0
 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);
 }
コード例 #6
0
 public async Task InsertRollAsync(ClientRollDTO roll) =>
 await _utility.InsertRollAsync <AttackRollRepositoryDto>("[Rolls].[Sto_InsertAttackRoll]", roll);
コード例 #7
0
 public async Task InsertRollAsync(ClientRollDTO roll) =>
 await _utility.InsertRollAsync <InitiativeRollRepositoryDto>("[Rolls].[Sto_InsertInitiativeRoll]", roll);
コード例 #8
0
 private static RepositoryRollCommentTable RollCommentsFromClientDto(ClientRollDTO roll) =>
 new RepositoryRollCommentTable();
コード例 #9
0
 private static RepositoryRollModifier ModifierFromClientDto(ClientRollDTO roll) =>
 new RepositoryRollModifier
 {
     Value = roll.Modifier
 };
コード例 #10
0
 private static RepositoryDieRoll SingleDieRollFromClientDto(ClientRollDTO roll, int sides) =>
 new RepositoryDieRoll
 {
     NumberOfSides = sides,
     Value         = roll.RollValue
 };
コード例 #11
0
 public async Task InsertRollAsync(ClientRollDTO roll) =>
 await _utility.InsertRollAsync <SavingThrowRepositoryDto>("[Rolls].[Sto_InsertSavingThrow]", roll);