//partial void RunCustomLogicAfterInsert(ref entCM.LookupList newDBItem, ref IRepositoryActionResult<entCM.LookupList> result) {}

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

        partial void RunCustomLogicAfterUpdatePut(ref entCM.LookupList updatedDBItem, ref IRepositoryActionResult <entCM.LookupList> 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.LookupList> >(() => Repo.InsertAsync(localDBItem));
                if (insertResult.Status == Enums.RepositoryActionStatus.Created)
                {                   // Insert worked
                    result = new RepositoryActionResult <entCM.LookupList>(insertResult.Entity, Enums.RepositoryActionStatus.Updated);
                }
            }
        }
Пример #2
0
 partial void RunCustomLogicOnGetEntityByPK(ref entCM.LookupList dbItem, int lookupListId, int numChildLevels);
Пример #3
0
 partial void RunCustomLogicBeforeUpdatePut(ref entCM.LookupList updatedDBItem, int lookupListId);
Пример #4
0
 partial void RunCustomLogicAfterUpdatePut(ref entCM.LookupList updatedDBItem, ref IRepositoryActionResult <entCM.LookupList> result);
Пример #5
0
 partial void RunCustomLogicAfterInsert(ref entCM.LookupList newDBItem, ref IRepositoryActionResult <entCM.LookupList> result);