public static void ToEntity(this CampanieMarketingModel model, ref CampanieMarketing entity) { entity.Nume = model.Nume; entity.Descriere = model.Descriere; if (model.Id == 0) { entity.DataAdaugarii = DateTime.Now; } }
/// <summary> /// Create a new CampanieMarketing 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 CampanieMarketing CreateCampanieMarketing(global::System.Int32 id, global::System.String nume, global::System.DateTime dataAdaugarii) { CampanieMarketing campanieMarketing = new CampanieMarketing(); campanieMarketing.ID = id; campanieMarketing.Nume = nume; campanieMarketing.DataAdaugarii = dataAdaugarii; return campanieMarketing; }
/// <summary> /// Deprecated Method for adding a new object to the CampanieMarketings EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToCampanieMarketings(CampanieMarketing campanieMarketing) { base.AddObject("CampanieMarketings", campanieMarketing); }