public void CrearPreMatricula(CrearPreMatriculaRequest preMatriculaRequest, string expected) { _crearPreMatriculaService = new CrearPreMatriculaService(_unitOfWork); var response = _crearPreMatriculaService.Ejecutar(preMatriculaRequest); Assert.AreEqual(expected, response.Message); }
public async Task <IActionResult> CreatePrematricula([FromBody] CrearPreMatriculaRequest request) { _service = new CrearPreMatriculaService(_unitOfWork); var rta = _service.Ejecutar(request); if (rta.isOk()) { await _context.SaveChangesAsync(); return(CreatedAtAction("GetPreMatricula", new { Id = request.id }, request)); } return(BadRequest(rta.Message)); }