annotate Demo/Asp.Net/BusinessLogic/DataAccess/InventoryAccessor.cs @ 5:f7d63a092920
Исправлено условие Where в тех случаях, когда репозитарий не является генериком
author |
cin |
date |
Tue, 10 Mar 2015 16:02:11 +0300 |
parents |
f990fcb411a9 |
children |
|
rev |
line source |
0
|
1 using System;
|
|
2
|
|
3 using BLToolkit.Data;
|
|
4 using BLToolkit.DataAccess;
|
|
5
|
|
6 namespace PetShop.BusinessLogic.DataAccess
|
|
7 {
|
|
8 using ObjectModel;
|
|
9
|
|
10 public abstract class InventoryAccessor : AccessorBase<InventoryAccessor.DB, InventoryAccessor>
|
|
11 {
|
|
12 public class DB : DbManager { public DB() : base("InventoryDB") {} }
|
|
13
|
|
14 [SqlQuery(@"UPDATE Inventory SET Qty = Qty - @qty WHERE ItemId = @itemId")]
|
|
15 public abstract void TakeInventory(DbManager db, int @qty, string @itemId);
|
|
16 }
|
|
17 }
|