//Get the details of a particular Cover public CoverModel GetCoverData(long id) { try { CoverModel cover = doruDB.Cover.Find(id); return(cover); } catch { throw; } }
//To Update the records of a particluar Cover public int UpdateCover(CoverModel cover) { try { doruDB.Entry(cover).State = EntityState.Modified; doruDB.SaveChanges(); return(1); } catch { throw; } }
//To Add new Cover record public int AddCover(CoverModel cover) { try { doruDB.Cover.Add(cover); doruDB.SaveChanges(); return(1); } catch { throw; } }
//To Delete the record of a particular Cover public int DeleteCover(long id) { try { CoverModel cover = doruDB.Cover.Find(id); doruDB.Cover.Remove(cover); doruDB.SaveChanges(); return(1); } catch { throw; } }