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

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

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