Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

c# make a automapper

			var config = new MapperConfiguration(cfg =>
                    cfg.CreateMap<Employee, EmployeeDTO>()
                );
            //Creating the source object
            Employee emp = new Employee
            {
                Name = "James",
                Salary = 20000,
                Address = "London",
                Department = "IT"
            };
            //Using automapper
            var mapper = new Mapper(config);
            var empDTO = mapper.Map<EmployeeDTO>(emp);
            //OR
            //var empDTO2 = mapper.Map<Employee, EmployeeDTO>(emp);
Comment

PREVIOUS NEXT
Code Example
Csharp :: How can I display image from database in asp.net mvc. I created image table and image path as varchar 
Csharp :: center mouse unity 
Csharp :: async await c# 
Csharp :: c# split include separators 
Csharp :: combine two arraylist c# 
Csharp :: loop for x amount of seconds c# 
Csharp :: c# generic return type in interface 
Csharp :: how to get the today date in c# 
Csharp :: checkbox in c# 
Csharp :: foreach c# linq example 
Csharp :: serenity frameword order column 
Csharp :: c# list string where 
Csharp :: kendo validator tries to validate hidden fields 
Csharp :: sucess messages in c# 
Csharp :: linq from list c# 
Csharp :: how to hide the title bar of window in monogame 
Csharp :: monogame button 
Csharp :: cache trong mvc 
Csharp :: unity unhide object 
Csharp :: wpf binding object get value 
Csharp :: stop playing audiosource 
Csharp :: unity how to make gamemanager instance 
Csharp :: declare multiple variables in for loop C# 
Csharp :: unity awake 
Csharp :: write last line txt file c# 
Csharp :: c# timer single tick 
Csharp :: c# get private property 
Csharp :: c# external execute batch 
Csharp :: c# datediff 
Csharp :: how to set a color of text in unity 2020 script 
ADD CONTENT
Topic
Content
Source link
Name
8+2 =