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

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

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