3

I have an entity with an aggregated value object, like this:

public class Address {
    public string Town { get; set; }
    public string Street { get; set; }
    public string Region { get; set; }
    ...
}

public class Contact {
    public Int32 Id { get; set; }
    public string Name { get; set; }
    public Address Address { get; set; }
}

My persistence model is a single table with the following fields: Id, Name, Street, Town, Region, ecc. Is it possible to Create/Read/Update/Delete entities in this situation with Dapper?

petrux
  • 1,743
  • 1
  • 17
  • 30
  • Possible duplicate of [Correct use of Multimapping in Dapper](https://stackoverflow.com/questions/7472088/correct-use-of-multimapping-in-dapper) – StayOnTarget Oct 11 '18 at 10:50

1 Answers1

3

You can use the multi mapping feature. Here there are some examples:

Correct use of Multimapping in Dapper

Community
  • 1
  • 1
Alberto
  • 15,626
  • 9
  • 43
  • 56