Inheritance: System.Data.Objects.DataClasses.EntityObject
 /// <summary>
 /// Create a new Commands object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="username">Initial value of the Username property.</param>
 /// <param name="command">Initial value of the Command property.</param>
 /// <param name="posted">Initial value of the Posted property.</param>
 public static Commands CreateCommands(global::System.Guid id, global::System.String username, global::System.String command, global::System.DateTime posted)
 {
     Commands commands = new Commands();
     commands.Id = id;
     commands.Username = username;
     commands.Command = command;
     commands.Posted = posted;
     return commands;
 }
Esempio n. 2
0
        void QueueCommand(IrcEventArgs e, DataContext context, string commandText)
        {
            commandText = commandText.Substring(2).Trim();
            var command = new Commands { Id = Guid.NewGuid(), Command = commandText.Trim(), Posted = DateTime.Now, Username = e.Data.Nick };

            context.Commands.AddObject(command);
            context.SaveChanges();
        }
 /// <summary>
 /// Deprecated Method for adding a new object to the Commands EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToCommands(Commands commands)
 {
     base.AddObject("Commands", commands);
 }