コード例 #1
0
ファイル: BorrowService.cs プロジェクト: evanang/asp
        public async Task <ExecuteResult> Borrow(BookModel Model)
        {
            var Param = new SqlParameter[]
            {
                new SqlParameter("@BookID", Model.BookID),
                new SqlParameter("@BookName", Model.BookName),
                new SqlParameter("@BookDesc", Model.BookDesc)
            };

            List <StoredProcedure> Data = new List <StoredProcedure>();

            Data.Add(new StoredProcedure
            {
                SPName   = "bn_BookDB_Borrow @BookID, @BookName, @BookDesc",
                SQLParam = Param
            });

            ExecuteResult Result = (await _BorrowRepository.ExecMultipleSPWithTransactionAsync(Data));

            return(Result);
        }