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) }); }
/// <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) }); }