/// <summary> /// Deprecated Method for adding a new object to the FixedAssets EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToFixedAssets(FixedAsset fixedAsset) { base.AddObject("FixedAssets", fixedAsset); }
/// <summary> /// Create a new FixedAsset object. /// </summary> /// <param name="id">Initial value of the ID property.</param> public static FixedAsset CreateFixedAsset(global::System.Int32 id) { FixedAsset fixedAsset = new FixedAsset(); fixedAsset.ID = id; return fixedAsset; }
public bool InsertLedgerBookRow(VoucherBase record, BLL.Model.Entity.FixedAsset fixedAsset) { int recordId = InsertLedgerRecord(record); if (recordId > 0) { FixedAsset dalFixedAsset = new FixedAsset { Name = fixedAsset.Name, DepreciationRate = fixedAsset.DepreciationRate, RecordID = recordId }; _db.AddToFixedAssets(dalFixedAsset); _db.SaveChanges(); return true; } return false; }