public Enlace(Testigo testigo) { Id = testigo.id; Nombre = testigo.nombre; Telefono = testigo.numero; Activo = testigo.activo; }
public bool Save() { using (var db = new edayRoomEntities()) { var testigo = new Testigo { id_mesa = IdMesa, nombre = Nombre, numero = Numero, activo = Activo }; db.Testigoes.AddObject(testigo); db.SaveChanges(); Id = testigo.id; return true; } }
/// <summary> /// Create a new Testigo object. /// </summary> /// <param name="id">Initial value of the id property.</param> /// <param name="numero">Initial value of the numero property.</param> /// <param name="nombre">Initial value of the nombre property.</param> /// <param name="id_mesa">Initial value of the id_mesa property.</param> /// <param name="activo">Initial value of the activo property.</param> public static Testigo CreateTestigo(global::System.Int32 id, global::System.String numero, global::System.String nombre, global::System.Int32 id_mesa, global::System.Boolean activo) { Testigo testigo = new Testigo(); testigo.id = id; testigo.numero = numero; testigo.nombre = nombre; testigo.id_mesa = id_mesa; testigo.activo = activo; return testigo; }
public EnlacePartipacion(Testigo testigo) : base(testigo) { IdMesa = testigo.id_mesa; }
/// <summary> /// Deprecated Method for adding a new object to the Testigoes EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToTestigoes(Testigo testigo) { base.AddObject("Testigoes", testigo); }