Exemplo n.º 1
0
        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>();
        }
Exemplo n.º 2
0
 public static Client ToModel(this Entities.Client client)
 {
     return(Mapper.Map <Entities.Client, Client>(client));
 }