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