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

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

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