public IHttpActionResult Add(UserSkillRelation userSkillRelation) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } _repository.Add(userSkillRelation); return(CreatedAtRoute("DefaultApi", new { id = userSkillRelation.Id }, userSkillRelation)); }
public void Update(UserSkillRelation userSkillRelation) { db.Entry(userSkillRelation).State = EntityState.Modified; try { db.SaveChanges(); } catch (DbUpdateConcurrencyException) { throw; } }
public void Delete(UserSkillRelation userSkillRelation) { db.Relations.Remove(userSkillRelation); db.SaveChanges(); }
public void Add(UserSkillRelation userSkillRelation) { db.Relations.Add(userSkillRelation); db.SaveChanges(); }