public ClassificationLevel GetClassificationlevelById(int ClassificationLevelId) { try { ClassificationLevel classificationLevel = db.ClassificationLevel.Find(ClassificationLevelId); return(classificationLevel); } catch { throw; } }
public int AddClassificationLevel(ClassificationLevel classificationLevel) { try { db.ClassificationLevel.Add(classificationLevel); db.SaveChanges(); return(1); } catch { throw; } }
//to delete ClassificationLevel public int DeleteClassificationLevel(int classificationLevelId) { try { ClassificationLevel classificationlevel = db.ClassificationLevel.Find(classificationLevelId); db.ClassificationLevel.Remove(classificationlevel); db.SaveChanges(); return(1); } catch { throw; } }
public int UpdateClassificationLevel(ClassificationLevel classificationLevel) { try { db.Entry(classificationLevel).State = EntityState.Modified; db.SaveChanges(); return(1); } catch { throw; } }