// Insert Methods public static void InsertFeedback(Feedback f) { naturenet_dataclassDataContext db = new naturenet_dataclassDataContext(); db.Feedbacks.InsertOnSubmit(f); Action a = new Action(); a.date = DateTime.Now; a.type_id = 1; a.object_type = f.GetType().ToString(); a.user_id = f.user_id; try { db.SubmitChanges(); a.object_id = f.id; db.Actions.InsertOnSubmit(a); db.SubmitChanges(); } catch (Exception e) { log.WriteErrorLog(e); } }
partial void DeleteFeedback(Feedback instance);
partial void UpdateFeedback(Feedback instance);
partial void InsertFeedback(Feedback instance);
private void detach_Feedbacks(Feedback entity) { this.SendPropertyChanging(); entity.Feedback_Type = null; }
private void attach_Feedbacks(Feedback entity) { this.SendPropertyChanging(); entity.Feedback_Type = this; }