Пример #1
0
        public static ModelMetadata Metadata(this IModel model)
        {
            var metadata = ModelMetadata.Find(model);

            if (metadata == null)
            {
                throw new Exception($"Metadata not loaded for model with type {model.GetType()}");
            }

            return(metadata);
        }