1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Text;
|
---|
5 | using HeuristicLab.DataAccess.ADOHelper;
|
---|
6 | using System.Data.SqlClient;
|
---|
7 | using HeuristicLab.Hive.Contracts.BusinessObjects;
|
---|
8 | using System.Data.Common;
|
---|
9 |
|
---|
10 | namespace HeuristicLab.Hive.Server.ADODataAccess.TableAdapterWrapper {
|
---|
11 | class ClientGroup_ResourceAdapterWrapper :
|
---|
12 | TableAdapterWrapperBase<dsHiveServerTableAdapters.ClientGroup_ResourceTableAdapter,
|
---|
13 | ManyToManyRelation,
|
---|
14 | dsHiveServer.ClientGroup_ResourceRow> {
|
---|
15 | public override dsHiveServer.ClientGroup_ResourceRow
|
---|
16 | InsertNewRow(ManyToManyRelation relation) {
|
---|
17 | dsHiveServer.ClientGroup_ResourceDataTable data =
|
---|
18 | new dsHiveServer.ClientGroup_ResourceDataTable();
|
---|
19 |
|
---|
20 | dsHiveServer.ClientGroup_ResourceRow row =
|
---|
21 | data.NewClientGroup_ResourceRow();
|
---|
22 |
|
---|
23 | row.ClientGroupId = relation.Id;
|
---|
24 | row.ResourceId = relation.Id2;
|
---|
25 |
|
---|
26 | data.AddClientGroup_ResourceRow(row);
|
---|
27 | TransactionalAdapter.Update(row);
|
---|
28 |
|
---|
29 | return row;
|
---|
30 | }
|
---|
31 |
|
---|
32 | public override void
|
---|
33 | UpdateRow(dsHiveServer.ClientGroup_ResourceRow row) {
|
---|
34 | TransactionalAdapter.Update(row);
|
---|
35 | }
|
---|
36 |
|
---|
37 | public override IEnumerable<dsHiveServer.ClientGroup_ResourceRow>
|
---|
38 | FindById(Guid id) {
|
---|
39 | return TransactionalAdapter.GetDataByClientGroupId(id);
|
---|
40 | }
|
---|
41 |
|
---|
42 | public override IEnumerable<dsHiveServer.ClientGroup_ResourceRow>
|
---|
43 | FindAll() {
|
---|
44 | return TransactionalAdapter.GetData();
|
---|
45 | }
|
---|
46 |
|
---|
47 | protected override void SetConnection(DbConnection connection) {
|
---|
48 | adapter.Connection = connection as SqlConnection;
|
---|
49 | }
|
---|
50 |
|
---|
51 | protected override void SetTransaction(DbTransaction transaction) {
|
---|
52 | adapter.Transaction = transaction as SqlTransaction;
|
---|
53 | }
|
---|
54 | }
|
---|
55 | }
|
---|