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

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

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