/// <summary> /// Add a new Library_Material /// </summary> /// <param name="library_Material">The Library Material to add</param> /// <returns>True if Library Material is added successfuly otherwise false</returns> public bool AddNewLibraryMaterial(Library_Material library_Material) { if (library_Material != null) { db.Library_Material.Add(library_Material); db.SaveChanges(); return(true); } return(false); }
/// <summary> /// Edit a Library Material /// </summary> /// <param name="library_Material">Library Material object</param> public void EditLibraryMaterial(Library_Material library_Material) { db.Entry(library_Material).State = EntityState.Modified; db.SaveChanges(); }