public NewDbContextTemplateModel(string dbContextName, ModelType modelType)
        {
            if (dbContextName == null)
            {
                throw new ArgumentNullException(nameof(dbContextName));
            }

            if (modelType == null)
            {
                throw new ArgumentNullException(nameof(modelType));
            }

            var modelNamespace = modelType.Namespace;

            ModelTypeName = modelType.Name;
            RequiredNamespaces = new HashSet<string>();

            var classNameModel = new ClassNameModel(dbContextName);

            DbContextTypeName = classNameModel.ClassName;
            DbContextNamespace = classNameModel.NamespaceName;

            if (!string.IsNullOrEmpty(modelNamespace) &&
                !string.Equals(modelNamespace, DbContextNamespace, StringComparison.Ordinal))
            {
                RequiredNamespaces.Add(modelNamespace);
            }
        }
        public ControllerWithContextTemplateModel(
            [NotNull]ModelType modelType,
            [NotNull]string dbContextFullTypeName)
        {
            ModelType = modelType;

            var classNameModel = new ClassNameModel(dbContextFullTypeName);

            ContextTypeName = classNameModel.ClassName;
            DbContextNamespace = classNameModel.NamespaceName;
        }
        public NewDbContextTemplateModel([NotNull] string dbContextName, [NotNull] ModelType modelType)
        {
            var modelNamespace = modelType.Namespace;

            ModelTypeName      = modelType.Name;
            RequiredNamespaces = new HashSet <string>();

            var classNameModel = new ClassNameModel(dbContextName);

            DbContextTypeName  = classNameModel.ClassName;
            DbContextNamespace = classNameModel.NamespaceName;

            if (!string.IsNullOrEmpty(modelNamespace) &&
                !string.Equals(modelNamespace, DbContextNamespace, StringComparison.Ordinal))
            {
                RequiredNamespaces.Add(modelNamespace);
            }
        }
        public ControllerWithContextTemplateModel(
            ModelType modelType,
            string dbContextFullTypeName)
        {
            if (modelType == null)
            {
                throw new ArgumentNullException(nameof(modelType));
            }

            if (dbContextFullTypeName == null)
            {
                throw new ArgumentNullException(nameof(dbContextFullTypeName));
            }

            ModelType = modelType;

            var classNameModel = new ClassNameModel(dbContextFullTypeName);

            ContextTypeName = classNameModel.ClassName;
            DbContextNamespace = classNameModel.NamespaceName;
        }