Beispiel #1
0
        public async Task <ActionResult> Remove([FromServices] RhNetContext rhNetContext, [FromBody] Ato_NormativoModel ato_normativoModel)
        {
            Ato_NormativoRepository repository = new Ato_NormativoRepository();
            object result = await repository.Remove(rhNetContext, ato_normativoModel);

            if (result.GetType() == typeof(Ato_NormativoModel))
            {
                return(Ok(result));
            }
            else
            {
                ModelState.AddModelError("errors", result.ToString());
                return(BadRequest(ModelState));
            }
        }
Beispiel #2
0
 Ato_NormativoController()
 {
     rhNetContext = HttpContext.Current.GetOwinContext().GetUserManager <RhNetContext>();
     repository   = new Ato_NormativoRepository();
 }
Beispiel #3
0
        public async Task <ActionResult <List <Ato_NormativoModel> > > Get([FromServices] RhNetContext rhNetContext)
        {
            Ato_NormativoRepository repository = new Ato_NormativoRepository();

            return(await repository.Get(rhNetContext));
        }