public void Update(SpecialisationLevel level)
        {
            EntityEntry dbEntity = entitiesContext.Entry <SpecialisationLevel>(level);

            dbEntity.State = Microsoft.EntityFrameworkCore.EntityState.Modified;
            entitiesContext.SaveChanges();
        }
        public IActionResult Post(SpecialisationLevel level)
        {
            var newLevel = specLevelService.Create(level);

            if (newLevel.Id == Guid.Empty)
            {
                return(StatusCode(500));
            }
            return(Ok(newLevel));
        }
Пример #3
0
        public IActionResult Post(SpecialisationLevel specialisationLevel)
        {
            var newLevel = specialisationLevelService.Create(specialisationLevel);

            if (newLevel.Id == Guid.Empty)
            {
                return(StatusCode(500));
            }
            return(CreatedAtAction("Get", newLevel));
        }
 public void Update(SpecialisationLevel level)
 {
     repo.Update(level);
 }
 public void Delete(SpecialisationLevel level)
 {
     level.IsDeleted = true;
     repo.Update(level);
 }
 public SpecialisationLevel Create(SpecialisationLevel level)
 {
     return(repo.Create(level));
 }
Пример #7
0
 public IActionResult Put(SpecialisationLevel level)
 {
     specLevelService.Update(level);
     return(Ok(level));
 }
Пример #8
0
 public IActionResult Delete(SpecialisationLevel level)
 {
     specLevelService.Delete(level);
     return(NoContent());
 }
Пример #9
0
        public IActionResult Post([FromBody] SpecialisationLevel level)
        {
            var newLevel = specLevelService.Add(level);

            return(Ok(newLevel));
        }
 public SpecialisationLevel Add(SpecialisationLevel level)
 {
     return(repo.Add(level));
 }
Пример #11
0
 public void Update(SpecialisationLevel level)
 {
     specialisationLevelRepository.Update(level);
 }
Пример #12
0
 public void Delete(SpecialisationLevel level)
 {
     level.IsDeleted = true;
     specialisationLevelRepository.Update(level);
 }
Пример #13
0
 public SpecialisationLevel Create(SpecialisationLevel level)
 {
     return(specialisationLevelRepository.Create(level));
 }
 public SpecialisationLevel Add(SpecialisationLevel level)
 {
     entitiesContext.Set <SpecialisationLevel>().Add(level);
     entitiesContext.SaveChanges();
     return(level);
 }