public void Duplicates_properties_in_db_map() { var entity = new Entities.Client { Properties = new List <Entities.ClientProperty>() { new Entities.ClientProperty { Key = "foo1", Value = "bar1" }, new Entities.ClientProperty { Key = "foo1", Value = "bar2" }, } }; Action modelAction = () => entity.ToModel(); modelAction.Should().Throw <Exception>(); }
public static Client ToModel(this Entities.Client client) { return(Mapper.Map <Entities.Client, Client>(client)); }