示例#1
0
        public async Task PilotCreate_ToDLModelShouldMapToPilot()
        {
            var newPilotCreate = new PilotCreate {
                ProducerID = 1, PilotName = "name", PilotDescription = "description"
            };
            var result = newPilotCreate.ToDLModel();

            Assert.Equal(newPilotCreate.ProducerID, result.ProducerID);
            Assert.Equal(newPilotCreate.PilotName, result.PilotName);
            Assert.Equal(newPilotCreate.PilotDescription, result.PilotDescription);
        }
 public CreatedID Create(PilotCreate apiModel)
 {
     return(new CreatedID {
         ID = _aviBL.AddPilot(apiModel.ToDLModel()).ID
     });
 }