public async Task <IActionResult> GetByDni(string dni) { InfractorBusiness infractorBusiness = new InfractorBusiness(); var result = infractorBusiness.GetByDni(_context, dni); if (result.Error == false) { return(Ok(result)); } else { return(BadRequest(result)); } }
public async Task <IActionResult> Add(InfractorEntity model) { InfractorBusiness infractorBusiness = new InfractorBusiness(); var result = infractorBusiness.Add(_context, model); if (result.Error == false) { return(Ok(result)); } else { return(BadRequest(result)); } }