Esempio n. 1
0
        public void Update(int id, ScopeVm scopeVm)
        {
            var entity = _passportContext.Set <Scope>().Find(id);

            entity.Description = scopeVm.Description;

            _passportContext.SaveChanges();
        }
Esempio n. 2
0
        public void Create(ScopeVm scopeVm)
        {
            var entity = new Scope
            {
                Name        = scopeVm.Name,
                Description = scopeVm.Description
            };

            _passportContext.Set <Scope>().Add(entity);
            _passportContext.SaveChanges();
        }
Esempio n. 3
0
 public IActionResult Create([FromBody] ScopeVm scopeVm)
 {
     _scopeRepository.Create(scopeVm);
     return(Ok());
 }