Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

AutoMapper Add Assemblies

public static IEnumerable<Type> GetAutoMapperProfilesFromAllAssemblies()
    {
        foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies())
        {
            foreach (var aType in assembly.GetTypes())
            {
                if (aType.IsClass && !aType.IsAbstract && aType.IsSubclassOf(typeof(Profile)))
                    yield return aType;
            }
        }
    }
Comment

PREVIOUS NEXT
Code Example
Csharp :: Dictionary of array in C# 
Csharp :: 403 forbidden error using Windows Forms 
Csharp :: reference variable from another script "winforms" c# 
Csharp :: c# linq unique by property 
Csharp :: C# if with obj params 
Csharp :: asp.net stop page jumping to top on click 
Csharp :: c# return propertty from each object in object lpist 
Csharp :: telerik mvc grid unbound column 
Csharp :: binaural generator 
Csharp :: c# object list contains object returns incorrect boolean 
Csharp :: retrive the last record dynamics 365 by c# 
Csharp :: Jeng InitDb 
Csharp :: c# how to convert string to float 
Csharp :: trigger enter with nav mesh 
Csharp :: lsbCat.Items.Clear();lsbCat.Items.AddRange(Cats.ToArray());txtCat.Clear(); 
Csharp :: firepower 4125 License update 
Csharp :: ismirrored c# 
Csharp :: Thread.Sleep() without freezing the UI 
Csharp :: get last id ef 
Csharp :: asp.net framework mvc cors error axios 
Csharp :: reflection assemblies gettypes 
Csharp :: properties vs field c# 
Csharp :: internet connection sharing 
Csharp :: how to full screen login form using C# MVC 
Csharp :: conveyor function in f# 
Csharp :: C#$ 
Csharp :: get patht bim 360 revit api 
Csharp :: c# string to control name 
Csharp :: c# replace foreach with lambda 
Csharp :: multiple lines in string c# parameterized 
ADD CONTENT
Topic
Content
Source link
Name
9+9 =