public async Task <CourseCategory> CreateAsync(CourseCategory entity)
        {
            entity.Code = await GetNextChildCodeAsync(entity.ParentId);
            await ValidateCourseCategoryAsync(entity);

            entity.Id = await EntityRepo.InsertAndGetIdAsync(entity);

            return(entity);
        }
        public async Task <Guid> CreateOrderAndGetId(Order entity)
        {
            await EntityRepo.InsertAndGetIdAsync(entity);

            return(entity.Id);
        }
        public async Task <Order> CreateOrderAndSave(Order entity)
        {
            await EntityRepo.InsertAndGetIdAsync(entity);

            return(entity);
        }