Free cookie consent management tool by TermsFeed Policy Generator

source: branches/UserManagement/HeuristicLab.Services.Authentication/Convert.cs @ 4584

Last change on this file since 4584 was 4584, checked in by jwolfing, 14 years ago

#1196 startup solution

File size: 1.5 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using HeuristicLab.Services.Authentication.DataAccess;
6using HeuristicLab.Services.Authentication.DataTransfer;
7
8namespace 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.