//partial void RunCustomLogicAfterInsert(ref entCSC.Country newDBItem, ref IRepositoryActionResult<entCSC.Country> result) {} //partial void RunCustomLogicAfterUpdatePatch(ref entCSC.Country updatedDBItem, ref IRepositoryActionResult<entCSC.Country> result) {} partial void RunCustomLogicAfterUpdatePut(ref entCSC.Country updatedDBItem, ref IRepositoryActionResult <entCSC.Country> 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 = RunSync <IRepositoryActionResult <entCSC.Country> >(() => Repo.InsertAsync(localDBItem)); if (insertResult.Status == Enums.RepositoryActionStatus.Created) { // Insert worked result = new RepositoryActionResult <entCSC.Country>(insertResult.Entity, Enums.RepositoryActionStatus.Updated); } } }
partial void RunCustomLogicOnGetEntityByPK(ref entCSC.Country dbItem, Guid countryId, int numChildLevels);
partial void RunCustomLogicBeforeUpdatePut(ref entCSC.Country updatedDBItem, Guid countryId);
partial void RunCustomLogicAfterUpdatePut(ref entCSC.Country updatedDBItem, ref IRepositoryActionResult <entCSC.Country> result);
partial void RunCustomLogicAfterInsert(ref entCSC.Country newDBItem, ref IRepositoryActionResult <entCSC.Country> result);