コード例 #1
0
        //partial void RunCustomLogicAfterInsert(ref entCM.Feedback newDBItem, ref IRepositoryActionResult<entCM.Feedback> result) {}

        //partial void RunCustomLogicAfterUpdatePatch(ref entCM.Feedback updatedDBItem, ref IRepositoryActionResult<entCM.Feedback> result) {}

        partial void RunCustomLogicAfterUpdatePut(ref entCM.Feedback updatedDBItem, ref IRepositoryActionResult <entCM.Feedback> 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.Feedback> >(() => Repo.InsertAsync(localDBItem));
                if (insertResult.Status == Enums.RepositoryActionStatus.Created)
                {                   // Insert worked
                    result = new RepositoryActionResult <entCM.Feedback>(insertResult.Entity, Enums.RepositoryActionStatus.Updated);
                }
            }
        }
コード例 #2
0
 partial void RunCustomLogicOnGetEntityByPK(ref entCM.Feedback dbItem, System.Guid feedbackId, int numChildLevels);
コード例 #3
0
 partial void RunCustomLogicAfterUpdatePut(ref entCM.Feedback updatedDBItem, ref IRepositoryActionResult <entCM.Feedback> result);
コード例 #4
0
 partial void RunCustomLogicBeforeUpdatePut(ref entCM.Feedback updatedDBItem, System.Guid feedbackId);
コード例 #5
0
 partial void RunCustomLogicAfterInsert(ref entCM.Feedback newDBItem, ref IRepositoryActionResult <entCM.Feedback> result);