/// <summary> /// Deprecated Method for adding a new object to the SpecialSchemeIncentives EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToSpecialSchemeIncentives(SpecialSchemeIncentive specialSchemeIncentive) { base.AddObject("SpecialSchemeIncentives", specialSchemeIncentive); }
public static SpecialIncentiveModel FromDomainModel(SpecialSchemeIncentive specialIncentive) { return new SpecialIncentiveModel { Id = specialIncentive.Id, SpecialSchemeId = specialIncentive.SpecialSchemeId, SpecialIncentive = specialIncentive.SpecialIncentive }; }
/// <summary> /// Create a new SpecialSchemeIncentive object. /// </summary> /// <param name="id">Initial value of the Id property.</param> /// <param name="incentiveId">Initial value of the IncentiveId property.</param> /// <param name="specialIncentive">Initial value of the SpecialIncentive property.</param> /// <param name="objectInfo">Initial value of the ObjectInfo property.</param> /// <param name="specialSchemeId">Initial value of the SpecialSchemeId property.</param> public static SpecialSchemeIncentive CreateSpecialSchemeIncentive(global::System.Int32 id, global::System.Int32 incentiveId, global::System.Double specialIncentive, ObjectInfo objectInfo, global::System.Int32 specialSchemeId) { SpecialSchemeIncentive specialSchemeIncentive = new SpecialSchemeIncentive(); specialSchemeIncentive.Id = id; specialSchemeIncentive.IncentiveId = incentiveId; specialSchemeIncentive.SpecialIncentive = specialIncentive; specialSchemeIncentive.ObjectInfo = StructuralObject.VerifyComplexObjectIsNotNull(objectInfo, "ObjectInfo"); specialSchemeIncentive.SpecialSchemeId = specialSchemeId; return specialSchemeIncentive; }
public void UpdateSpecialSchemeIncentive(SpecialSchemeIncentive specialIncentive) { var oldSpecialIncentive = GetSpecialSchemeIncentive(specialIncentive.Id); oldSpecialIncentive.IncentiveId = specialIncentive.IncentiveId; oldSpecialIncentive.SpecialSchemeId = specialIncentive.SpecialSchemeId; oldSpecialIncentive.SpecialIncentive = specialIncentive.SpecialIncentive; specialIncentiveRepo.SaveChanges(); }