public int Create(AssetManager.Models.Pointer product) { //Data.Model.Work prdct = product.MapTo<Data.Model.Work>(); //prdct.SetAuditFieldsOnCreate<Data.Model.Work>(this.Context); //product.Id = Convert.ToInt32(this.DB.Insert(prdct)); return(product.Id); }
public bool Update(AssetManager.Models.Pointer product) { //var exisitingProduct = this.DB.SingleOrDefault<Data.Model.Work>("Where id =@0", product.Id); //Data.Model.Work prdct = product.MapTo<Data.Model.Work>(); //prdct.SetAuditFieldsOnUpdate<Data.Model.Work>(this.Context); //this.DB.Update(prdct, new List<string> { "Date", "Name", "Area", "Program", "WorkInvolved", "StaffNominated", "Substitude", "Result", "Remarks", "TerminalTightness", "GaugeTest", "OutOfCorrespondense", "NormalIndication", "ReverseIndication", "TongueFloating", "CutOut", "ModifiedBy", "DateModified" }); return(true); }