English 中文(简体)
AutoMapper能否为每个收款成员寻找目的地?
原标题:Can AutoMapper call a method on destination for each member of collection on source?
  • 时间:2010-04-09 16:10:49
  •  标签:
  • automapper

我有两个班级如下。

public class Destination
{
   public Destination()
   {
      _StringCollection = new List<String>();
   }
   private ICollection<String> _StringCollection;
   public IEnumerable<String> StringCollection
   {
     get
     {
       return _StringCollection.AsEnumerable<String>();
     }
   }

   public void AddString(string str)
   {
      _StringCollection.Add(str);
   }
 }

 public class Source
 {
    public List<String> StringCollection { get; set; }
 }

我要向每一位消息来源称“AddString(成员)”的人绘制地图。

我认为,也许我可以做一些事,而似乎可以说明一下。

最佳回答

没有,你可以转向某种特定方法。 你可以把我暴露为“我会”,但那是这样。

问题回答

暂无回答




相关问题
AutoMapper With Generic Type Inheritance

I m trying to map CustomerDTO with my domain entity ICustomer with AutoMapper. Everything works fine for first inheritance level but not for the others. I m using Interfaces for my domain model since ...

C# automapper nested collections

I have a simple model like this one: public class Order{ public int Id { get; set; } ... ... public IList<OrderLine> OrderLines { get; set; } } public class OrderLine{ public int ...

Automapper, generics, dto funtimes

Here s the deal: I have a report designer where users can create reports based on some predefined datasets. They can select a set of columns to include in the report and then, when the report is ran, ...

Problem with AutoMapper in IIS7 when using signed assemblies

I am trying to use AutoMapper with web application running on IIS 7. The intended use it so map domain types defined in an external dll to view models defined in the IIS application. This works fine ...

asp.net mvc automapper parsing

let s say we have something like this public class Person { public string Name {get; set;} public Country Country {get; set;} } public class PersonViewModel { public Person Person {get; ...

热门标签