Example #1
0
 public static void ToEntity(this ProdusModel model, ref Produ entity)
 {
     entity.Nume = model.Nume;
     entity.Descriere = model.Descriere;
     if (model.Id == 0)
     {
         entity.DataAdaugarii = DateTime.Now;
     }
 }
Example #2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Produs EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToProdus(Produ produ)
 {
     base.AddObject("Produs", produ);
 }
Example #3
0
 /// <summary>
 /// Create a new Produ object.
 /// </summary>
 /// <param name="id">Initial value of the ID property.</param>
 /// <param name="nume">Initial value of the Nume property.</param>
 /// <param name="dataAdaugarii">Initial value of the DataAdaugarii property.</param>
 public static Produ CreateProdu(global::System.Int32 id, global::System.String nume, global::System.DateTime dataAdaugarii)
 {
     Produ produ = new Produ();
     produ.ID = id;
     produ.Nume = nume;
     produ.DataAdaugarii = dataAdaugarii;
     return produ;
 }