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