public static bool AddPrivateMessage(int fromId, int toId, string subject, string message) { PrivateMessageInfo pm = new PrivateMessageInfo() { FromID = fromId, ToID = toId, Subject = subject, TimeSent = DateTime.UtcNow, Message = message, TimeRead = DateTime.FromOADate(0) }; DatabaseDataContext db = new DatabaseDataContext(ConnectionString); db.PrivateMessageInfos.InsertOnSubmit(pm); db.SubmitChanges(); return db.PrivateMessageInfos.Contains(pm); }
public static bool AddPrivateMessage(int fromId, int toId, string subject, string message) { PrivateMessageInfo pm = new PrivateMessageInfo() { FromID = fromId, ToID = toId, Subject = subject, TimeSent = DateTime.UtcNow, Message = message, TimeRead = DateTime.FromOADate(0) }; DatabaseDataContext db = new DatabaseDataContext(ConnectionString); db.PrivateMessageInfos.InsertOnSubmit(pm); db.SubmitChanges(); return(db.PrivateMessageInfos.Contains(pm)); }
partial void DeletePrivateMessageInfo(PrivateMessageInfo instance);
partial void UpdatePrivateMessageInfo(PrivateMessageInfo instance);
partial void InsertPrivateMessageInfo(PrivateMessageInfo instance);