Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Text;
|
---|
5 | using HeuristicLab.Services.Authentication.DataAccess;
|
---|
6 | using HeuristicLab.Services.Authentication.DataTransfer;
|
---|
7 |
|
---|
8 | namespace HeuristicLab.Services.Authentication
|
---|
9 | {
|
---|
10 | public class Convert
|
---|
11 | {
|
---|
12 |
|
---|
13 | #region User
|
---|
14 |
|
---|
15 | public static aspnet_User ToEntity(User source)
|
---|
16 | {
|
---|
17 | if (source == null) return null;
|
---|
18 | return new aspnet_User() { UserName = source.UserName };
|
---|
19 | }
|
---|
20 |
|
---|
21 | public static User ToDataTransfer(aspnet_User source)
|
---|
22 | {
|
---|
23 | if (source == null) return null;
|
---|
24 | return new User() { UserName=source.UserName };
|
---|
25 | }
|
---|
26 |
|
---|
27 | #endregion
|
---|
28 |
|
---|
29 | //#region Platform
|
---|
30 | //public static DT.Platform ToDto(DA.Platform source)
|
---|
31 | //{
|
---|
32 | // if (source == null) return null;
|
---|
33 | // return new DT.Platform { Id = source.Id, Name = source.Name, Description = source.Description };
|
---|
34 | //}
|
---|
35 | //public static DA.Platform ToEntity(DT.Platform source)
|
---|
36 | //{
|
---|
37 | // if (source == null) return null;
|
---|
38 | // return new DA.Platform { Id = source.Id, Name = source.Name, Description = source.Description };
|
---|
39 | //}
|
---|
40 | //public static void ToEntity(DT.Platform source, DA.Platform target)
|
---|
41 | //{
|
---|
42 | // if ((source != null) && (target != null))
|
---|
43 | // target.Id = source.Id; target.Name = source.Name; target.Description = source.Description;
|
---|
44 | //}
|
---|
45 | //#endregion
|
---|
46 | }
|
---|
47 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.