예제 #1
0
 public TestTypeMinimal MapToBLL(TestTypeCreate apiTestType)
 {
     return(new TestTypeMinimal
     {
         Id = 0,
         TestTypeName = apiTestType.TestTypeName
     });
 }
예제 #2
0
        public async Task <ActionResult <Domain.App.TestType> > PostTestType(TestTypeCreate testType)
        {
            var bllEntity = _mapper.MapToBLL(testType);

            _bll.TestTypes.AddNoReturn(bllEntity);
            await _bll.SaveChangesAsync();

            return(CreatedAtAction("GetTestType", new { id = bllEntity.Id }, testType));
        }