public void SaveData(Models.AssesionMappingModel assesionMappingModel)
        {
            var data = new AssesionMapping()
            {
                AssesionID = assesionMappingModel.AssesionID,
                BookID     = assesionMappingModel.BookID,
                Status     = assesionMappingModel.Status,
            };

            context.AssesionMappings.Add(data);
            context.SaveChanges();
        }
 public void DeleteData(int id)
 {
     try
     {
         AssesionMapping data = new AssesionMapping();
         data = context.AssesionMappings.
                Where(a => a.AssesionID == id).FirstOrDefault();
         context.AssesionMappings.Remove(data);
         context.SaveChanges();
     }
     catch (Exception)
     {
         throw;
     }
 }
 public void UpdateData(Models.AssesionMappingModel model)
 {
     try
     {
         AssesionMapping data = new AssesionMapping();
         data = context.AssesionMappings.
                Where(a => a.AssesionID == model.AssesionID).FirstOrDefault();
         data.BookID = model.BookID;
         data.Status = model.Status;
         context.SaveChanges();
     }
     catch (Exception)
     {
         throw;
     }
 }