Rev | Line | |
---|
[1656] | 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 HLUserAdapterWrapper :
|
---|
| 12 | TableAdapterWrapperBase<
|
---|
| 13 | dsSecurityTableAdapters.HLUserTableAdapter,
|
---|
| 14 | User,
|
---|
| 15 | dsSecurity.HLUserRow> {
|
---|
| 16 | public override void UpdateRow(dsSecurity.HLUserRow row) {
|
---|
| 17 | TransactionalAdapter.Update(row);
|
---|
| 18 | }
|
---|
| 19 |
|
---|
| 20 | public override dsSecurity.HLUserRow
|
---|
| 21 | InsertNewRow(User user) {
|
---|
| 22 | dsSecurity.HLUserDataTable data =
|
---|
| 23 | new dsSecurity.HLUserDataTable();
|
---|
| 24 |
|
---|
| 25 | dsSecurity.HLUserRow row = data.NewHLUserRow();
|
---|
| 26 | row.PermissionOwnerId = user.Id;
|
---|
| 27 | data.AddHLUserRow(row);
|
---|
| 28 |
|
---|
| 29 | return row;
|
---|
| 30 | }
|
---|
| 31 |
|
---|
| 32 | public override IEnumerable<dsSecurity.HLUserRow>
|
---|
| 33 | FindById(Guid id) {
|
---|
| 34 | return TransactionalAdapter.GetDataById(id);
|
---|
| 35 | }
|
---|
| 36 |
|
---|
| 37 | public override IEnumerable<dsSecurity.HLUserRow>
|
---|
| 38 | FindAll() {
|
---|
| 39 | return TransactionalAdapter.GetData();
|
---|
| 40 | }
|
---|
| 41 |
|
---|
| 42 | protected override void SetConnection(DbConnection connection) {
|
---|
| 43 | adapter.Connection = connection as SqlConnection;
|
---|
| 44 | }
|
---|
| 45 |
|
---|
| 46 | protected override void SetTransaction(DbTransaction transaction) {
|
---|
| 47 | adapter.Transaction = transaction as SqlTransaction;
|
---|
| 48 | }
|
---|
| 49 | }
|
---|
| 50 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.