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.Security.Contracts.BusinessObjects;
|
---|
8 | using System.Data.Common;
|
---|
9 |
|
---|
10 | namespace HeuristicLab.Security.ADODataAccess.TableAdapterWrapper {
|
---|
11 | class PermissionOwner_UserGroupAdapterWrapper :
|
---|
12 | TableAdapterWrapperBase<
|
---|
13 | dsSecurityTableAdapters.PermissionOwner_UserGroupTableAdapter,
|
---|
14 | ManyToManyRelation,
|
---|
15 | dsSecurity.PermissionOwner_UserGroupRow> {
|
---|
16 | public override void UpdateRow(dsSecurity.PermissionOwner_UserGroupRow row) {
|
---|
17 | TransactionalAdapter.Update(row);
|
---|
18 | }
|
---|
19 |
|
---|
20 | public override dsSecurity.PermissionOwner_UserGroupRow
|
---|
21 | InsertNewRow(ManyToManyRelation relation) {
|
---|
22 | dsSecurity.PermissionOwner_UserGroupDataTable data =
|
---|
23 | new dsSecurity.PermissionOwner_UserGroupDataTable();
|
---|
24 |
|
---|
25 | dsSecurity.PermissionOwner_UserGroupRow row = data.NewPermissionOwner_UserGroupRow();
|
---|
26 | row.UserGroupId = relation.Id;
|
---|
27 | row.PermissionOwnerId = relation.Id2;
|
---|
28 |
|
---|
29 | data.AddPermissionOwner_UserGroupRow(row);
|
---|
30 |
|
---|
31 | return row;
|
---|
32 | }
|
---|
33 |
|
---|
34 | public override IEnumerable<dsSecurity.PermissionOwner_UserGroupRow>
|
---|
35 | FindById(Guid id) {
|
---|
36 | return TransactionalAdapter.GetDataByUserGroupId(id);
|
---|
37 | }
|
---|
38 |
|
---|
39 | public override IEnumerable<dsSecurity.PermissionOwner_UserGroupRow>
|
---|
40 | FindAll() {
|
---|
41 | return TransactionalAdapter.GetData();
|
---|
42 | }
|
---|
43 |
|
---|
44 | protected override void SetConnection(DbConnection connection) {
|
---|
45 | adapter.Connection = connection as SqlConnection;
|
---|
46 | }
|
---|
47 |
|
---|
48 | protected override void SetTransaction(DbTransaction transaction) {
|
---|
49 | adapter.Transaction = transaction as SqlTransaction;
|
---|
50 | }
|
---|
51 | }
|
---|
52 | }
|
---|