public bool Create(Competence competence) { try { dbCompentence.Competences.Add(competence); dbCompentence.SaveChanges(); return(true); } catch (Exception) { return(false); } }
public bool Delete(int category) { TeamUpContext dbCategory = new TeamUpContext(); dbCategory.Database.ExecuteSqlCommand("delete from [Categories] where [CategoryID] =" + category); dbCategory.Database.ExecuteSqlCommand("Delete from [CategoryProjects] where [Category_CategoryID] = " + category); dbCategory.SaveChanges(); return(true); }
public bool Create(Reply reply) { TeamUpContext dbReply = new TeamUpContext(); dbReply.Replies.Add(reply); dbReply.SaveChanges(); return(true); }
public bool Create(Category category) { TeamUpContext dbCategory = new TeamUpContext(); try { dbCategory.Categories.Add(category); dbCategory.SaveChanges(); return(true); } catch (Exception) { return(false); } }