示例#1
0
        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));
        }
示例#2
0
 public int Edit(Siupclass entity)
 {
     context.SbEdit(entity);
     return(context.SaveChanges());
 }
示例#3
0
 public int Add(Siupclass entity)
 {
     context.SbAdd(entity);
     return(context.SaveChanges());
 }