Example #1
0
        public IEntity FindModelEntity(string modelName)
        {
            foreach (var generator in NamesGenerators)
            {
                var modelNameToSearch = generator.GenerateObjectName(modelName);

                if (AllModels.TryGetValue(modelNameToSearch, out var model))
                {
                    return(model.Entity);
                }
            }

            return(null);
        }
Example #2
0
        public T FindModel <T>(string modelName)
            where T : Model
        {
            foreach (var generator in NamesGenerators)
            {
                var modelNameToSearch = generator.GenerateObjectName(modelName);

                if (AllModels.TryGetValue(modelNameToSearch, out var model))
                {
                    return((T)model);
                }
            }

            return(null);
        }