public IActionResult Save(SavePortfolioTransactionRequest model)
        {
            var result = _executionPipeline.Execute <SavePortfolioTransactionRequest, int>(model);

            if (!result.HasErrors())
            {
                result.Messages.Add(new MessageDto("M1", "Success", 0));
            }
            return(Json(result, Helpers.Json.Serialization.Default()));
        }
 protected override void Given()
 {
     _request = new SavePortfolioTransactionRequest()
     {
         PortfolioId                = _portfolioId,
         Date                       = DateTime.Now.ToString(),
         Price                      = 11.4m,
         Quantity                   = 2342,
         PortfolioShareId           = 1,
         PortfolioTransactionTypeId = 1,
         Total                      = 434,
     };
 }
Example #3
0
 protected override void Given()
 {
     _request = new SavePortfolioTransactionRequest()
     {
     };
 }