public async Task <IActionResult> DeleteChannel([Bind("ID,FunctionTemplateRefID,ColorKeyId,ValueRangeFrom,ValueRangeTo")] FunctionTemplateChannel functionTemplateChannel)
        {
            if (ModelState.IsValid)
            {
                FunctionTemplateChannel temp = await _context.FindAsync <FunctionTemplateChannel>(functionTemplateChannel.ID);

                if (temp == null)
                {
                    return(NotFound());
                }
                _context.Remove(temp);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            // ensure model is fully filled
            if (functionTemplateChannel.FunctionTemplate == null)
            {
                // load dependend Data
                //_context.Entry(functionTemplateChannel)
                ViewData["ColorKeyID"] = new SelectList(_context.ColorKeys, "ColorID", "ColorName", functionTemplateChannel.ColorKeyId);
            }
            return(View(functionTemplateChannel));
        }