예제 #1
0
 private void addButton_Click(object sender, RoutedEventArgs e)
 {
     var register = new Register {name = nameTextBox.Text, status = "Wait"};
     var context = guardDataSource.DomainContext as RegisterDomainContext;
     context.Registers.Add(register);
     guardDataSource.SubmitChanges();
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the Registers EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToRegisters(Register register)
 {
     base.AddObject("Registers", register);
 }
 /// <summary>
 /// Create a new Register object.
 /// </summary>
 /// <param name="id">Initial value of the id property.</param>
 public static Register CreateRegister(global::System.Int32 id)
 {
     Register register = new Register();
     register.id = id;
     return register;
 }