Ejemplo n.º 1
0
 public async Task Create(EstimatedGoal estimatedGoal)
 {
     await EstimatedGoals.InsertAsync(() => new EstimatedGoalEntity
     {
         Id            = estimatedGoal.Id,
         AssignPrice   = estimatedGoal.AssignPrice,
         CompletePrice = estimatedGoal.CompletePrice
     });
 }
Ejemplo n.º 2
0
        public async Task Execute(string goalId)
        {
            var assignPrice = await goalsConfigGetDbOperations.GetAssignGoalPrice();

            var completePrice = await goalsConfigGetDbOperations.GetCompleteGoalPrice();

            var estimatedGoal = new EstimatedGoal(goalId, assignPrice, completePrice);
            await estimatedGoalsWriteDbOperations.Create(estimatedGoal);

            await messageBus.Publish(new GoalUpdatedEventV1
            {
                Id           = estimatedGoal.Id,
                EstimatePart = new GoalUpdatedEventV1PricePart
                {
                    AssignPrice   = estimatedGoal.AssignPrice,
                    CompletePrice = estimatedGoal.CompletePrice
                }
            });
        }