C # mapper.mappa

Esempi di codice

4
0

c # mappa

var accounts = new Dictionary<string, double>();

// Initialise to zero...

accounts["Fred"] = 0;
accounts["George"] = 0;
accounts["Fred"] = 0;

// Add cash.
accounts["Fred"] += 4.56;
accounts["George"] += 1.00;
accounts["Fred"] += 1.00;

Console.WriteLine("Fred owes me ${0}", accounts["Fred"]);
0
0

c # mapper.mappa

var config = new MapperConfiguration(cfg => {                cfg.CreateMap<AuthorModel, AuthorDTO>();            });IMapper iMapper = config.CreateMapper();var source = new AuthorModel();source.Id = 1;source.FirstName = "Joydip";source.LastName = "Kanjilal";source.Address = "India";var destination = iMapper.Map<AuthorModel, AuthorDTO>(source);Console.WriteLine("Author Name: "+ destination.FirstName + " " + destination.LastName);

Pagine correlate

Pagine di esempio simili

In altre lingue

Questa pagina è in altre lingue

Русский
..................................................................................................................
English
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................