コード例 #1
0
        public virtual ApiSchemaAPersonResponseModel MapBOToModel(
            BOSchemaAPerson boSchemaAPerson)
        {
            var model = new ApiSchemaAPersonResponseModel();

            model.SetProperties(boSchemaAPerson.Id, boSchemaAPerson.Name);

            return(model);
        }
コード例 #2
0
        public void MapResponseToRequest()
        {
            var mapper = new ApiSchemaAPersonModelMapper();
            var model  = new ApiSchemaAPersonResponseModel();

            model.SetProperties(1, "A");
            ApiSchemaAPersonRequestModel response = mapper.MapResponseToRequest(model);

            response.Name.Should().Be("A");
        }