public IActionResult Post([FromBody] EstimationProject value)
        {
            if (value == null)
            {
                return(BadRequest());
            }

            _repoWrapper.Create(value);


            return(CreatedAtRoute("GetEstimation", new { Id = value.Id }, value));
        }
Esempio n. 2
0
        public async Task <int> Handle(CreateEstimationCommand request, CancellationToken cancellationToken)
        {
            var Estimation = request.Estimation;

            _estimationRepo.Create(Estimation);
            await _estimationRepo.SaveChangesAsync();

            return(Estimation.Id);
        }