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); }
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); }