示例#1
0
        public void Inser_Test()
        {
            using (var trans = TransHelper.NewScope())
            {
                //  arrange
                var expected = ApprovalTypeTestData();

                //  act-assert
                _sut.Insert(expected);
            }
        }
        public ApprovalTypeModel Add(ApprovalTypeModel approvalType)
        {
            //      INPUT VALIDATION
            var kt = Validate(approvalType);

            //      BUSINESS VALIDATION
            var approvalTypeDb = _approvalTypeDal.GetData(kt);

            approvalTypeDb.NotEmpty().Throw("APPROVAL TYPE ID already exist");

            //      REPO-OP
            _approvalTypeDal.Insert(kt);

            //      RETURN
            return(kt);
        }