/// <summary> /// Deprecated Method for adding a new object to the server_logs EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToserver_logs(server_logs server_logs) { base.AddObject("server_logs", server_logs); }
public int insertServerEvent(string event_desc, string col1 = "", string col2 = "", string col3 = "", string col4 = "", string col5 = "", string col6 = "", string col7 = "") { try { server_logs newentry = new server_logs(); newentry.col1 = col1; newentry.col2 = col2; newentry.col3 = col3; newentry.col4 = col4; newentry.col5 = col5; newentry.event_desc = event_desc; newentry.timestamp = DateTime.Now; _db.server_logs.AddObject(newentry); _db.SaveChanges(); } catch { return 0; } return 1; }
/// <summary> /// Create a new server_logs object. /// </summary> /// <param name="id">Initial value of the id property.</param> public static server_logs Createserver_logs(global::System.Int32 id) { server_logs server_logs = new server_logs(); server_logs.id = id; return server_logs; }