Exemplo n.º 1
0
        public void EditarPreMatricula(ActualizarPreMatriculaAllRequest request, string expected)
        {
            _PreMatriculaService = new ActualizarPreMatriculaAllService(_unitOfWork);
            var response = _PreMatriculaService.Ejecutar(request);

            Assert.AreEqual(expected, response.Message);
        }
        public async Task <IActionResult> PutPreMatricula([FromRoute] string id, [FromBody] ActualizarPreMatriculaAllRequest request)
        {
            _actualizarService = new ActualizarPreMatriculaAllService(_unitOfWork);
            var rta = _actualizarService.Ejecutar(request);

            if (rta.isOk())
            {
                await _context.SaveChangesAsync();

                return(CreatedAtAction("GetPreMatricula", new { id = request.id }, request));
            }
            return(BadRequest(rta.Message));
        }