//partial void RunCustomLogicAfterInsert(ref entCM.SponsorType newDBItem, ref IRepositoryActionResult<entCM.SponsorType> result) {} //partial void RunCustomLogicAfterUpdatePatch(ref entCM.SponsorType updatedDBItem, ref IRepositoryActionResult<entCM.SponsorType> result) {} partial void RunCustomLogicAfterUpdatePut(ref entCM.SponsorType updatedDBItem, ref IRepositoryActionResult <entCM.SponsorType> result) { if (result.Status == Enums.RepositoryActionStatus.NotFound) { // An update/PUT was attempted when it should have been a create/POST. var localDBItem = updatedDBItem; var insertResult = Utils.AsyncHelper.RunSync <IRepositoryActionResult <entCM.SponsorType> >(() => Repo.InsertAsync(localDBItem)); if (insertResult.Status == Enums.RepositoryActionStatus.Created) { // Insert worked result = new RepositoryActionResult <entCM.SponsorType>(insertResult.Entity, Enums.RepositoryActionStatus.Updated); } } }
partial void RunCustomLogicOnGetEntityByPK(ref entCM.SponsorType dbItem, int sponsorTypeId, int numChildLevels);
partial void RunCustomLogicBeforeUpdatePut(ref entCM.SponsorType updatedDBItem, int sponsorTypeId);
partial void RunCustomLogicAfterUpdatePut(ref entCM.SponsorType updatedDBItem, ref IRepositoryActionResult <entCM.SponsorType> result);
partial void RunCustomLogicAfterInsert(ref entCM.SponsorType newDBItem, ref IRepositoryActionResult <entCM.SponsorType> result);