Ejemplo n.º 1
0
 public static Authentication DTOToObject(AuthenticationDTO authentication)
 {
     return(new Authentication
     {
         competitor = CompetitorAdapter.DTOToObject(authentication.competitor),
         password = authentication.password,
         timestamp = DataConvert.StringJsonToDateTime(authentication.timestamp),
         updated = DataConvert.StringJsonToDateTime(authentication.updated)
     });
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Object to data transfer object
 /// </summary>
 /// <param name="authentication"></param>
 /// <returns></returns>
 public static AuthenticationDTO ObjectToDTO(Authentication authentication)
 {
     return(new AuthenticationDTO
     {
         competitor = CompetitorAdapter.ObjectToDTO(authentication.competitor),
         password = authentication.password,
         timestamp = DataConvert.DateTimeToJsonString(authentication.timestamp),
         updated = DataConvert.DateTimeToJsonString(authentication.updated)
     });
 }