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; } }
/// <summary> /// Deprecated Method for adding a new object to the Produs EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToProdus(Produ produ) { base.AddObject("Produs", produ); }
/// <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; }