public override async void SelectedContextItemDoubleClick(object context)
        {
            var tInfo = context as TemplateInfo;

            if (string.IsNullOrEmpty(tInfo?.Id))
            {
                await ShowMessage("Błąd", "Wskazany szablon jest nieprawidłowy (brak identyfikatora)");

                return;
            }

            if (ShowDialog(new TemplateViewModel(_templatesManager.GetTemplate(tInfo.Id))) == true)
            {
                LoadData();
            }
        }
        public async Task <IActionResult> Get(Guid id)
        {
            _logger.LogInformation($"Getting template by Id = {id}");
            try
            {
                var template = await _templatesManager.GetTemplate(id);

                if (template != null)
                {
                    return(Ok(_mapper.Map <Template>(template)));
                }
                else
                {
                    return(NotFound());
                }
            }
            catch (Exception ex)
            {
                _logger.LogError($"Failed to get template with Id = {id}", ex);
                return(BadRequest());
            }
        }