public IActionResult Post([FromBody] CreateEditViewModel Siup) { DataClaim.GetClaim(Request); var model = new Siupclass(); if (Siup is null) { return(BadRequest("SIUP Class is null.")); } if (!ModelState.IsValid) { return(BadRequest()); } var SiupMapper = _mapper.Map(Siup, model); _SIUPClassProvider.Add(SiupMapper); return(Ok(Siup)); }
public int Edit(Siupclass entity) { context.SbEdit(entity); return(context.SaveChanges()); }
public int Add(Siupclass entity) { context.SbAdd(entity); return(context.SaveChanges()); }