public void FetchChild(BusinessItemDto dto) // I only need the dependency within this method { using (BypassPropertyChecks) { MarkAsChild(); this.FetchChildID = dto.FetchUniqueID; } }
// We allow the Fetch calls (and delegates) to have multiple parameters // But the IHandleXYZ interface can only have one criteria as a parameter // with a tuple to handle multiple parameters // ObjectPortal will bridge the two by turning the multiple paramters to a tuple public void FetchChild(CriteriaBase g, BusinessItemDto dto) // I only need the dependency within this method { using (BypassPropertyChecks) { this.FetchChildID = dto.FetchUniqueID; this.Criteria = g.Guid; } }
public void UpdateChild(Guid criteria, IBusinessItemDal dal) { var dto = new BusinessItemDto(); dal.Update(dto); using (BypassPropertyChecks) { this.UpdatedID = dto.UpdateUniqueID; } }
private void _insert(BusinessItemDto dto) { dto.UpdateUniqueID = Guid.NewGuid(); }
/// <summary> /// Key point of this whole approach /// After an update we send the updated DTO back to it's originator /// So that we can get updated information like primary keys, etc /// </summary> /// <param name="dto"></param> public void UpdatedDto(BusinessItemDto dto) { this.UpdatedID = dto.UpdateUniqueID; }
public void Fetch(BusinessItemDto dto) { MarkAsChild(); this.FetchID = dto.FetchUniqueID; this.Criteria = dto.Criteria; }
public void Update(BusinessItemDto dto) { dto.UpdateUniqueID = Guid.NewGuid(); }