/// <summary> /// Maps a CodeCampService.Session to a Model.Session /// </summary> /// <param name="session"></param> /// <returns></returns> public static Model.Session Map(this Service.Session session) { var s = new Model.Session { ID = session.ID, EventID = session.EventID, Description = session.Description, Level = session.Level.ToString(CultureInfo.InvariantCulture), Name = session.Name, Speaker = session.Speaker, SpeakerID = session.SpeakerID, Status = session.Status, Location = string.IsNullOrEmpty(session.Location) ? string.Empty : session.Location }; return(s); }
/// <summary> /// Maps a Model.Session to a CodeCampService.Session /// </summary> /// <param name="session"></param> /// <returns></returns> public static Service.Session Map(this Model.Session session) { int sessionLevel = 0; Int32.TryParse(session.Level, out sessionLevel); var s = new Service.Session { ID = session.ID, EventID = session.EventID, Description = session.Description, Level = sessionLevel, Name = session.Name, Speaker = session.Speaker, SpeakerID = session.SpeakerID, Status = session.Status, Location = string.IsNullOrEmpty(session.Location) ? string.Empty : session.Location }; return(s); }
/// <summary> /// Maps a Model.Session to a CodeCampService.Session /// </summary> /// <param name="session"></param> /// <returns></returns> public static Service.Session Map(this Model.Session session) { int sessionLevel = 0; Int32.TryParse(session.Level, out sessionLevel); var s = new Service.Session { ID = session.ID, EventID = session.EventID, Description = session.Description, Level = sessionLevel, Name = session.Name, Speaker = session.Speaker, SpeakerID = session.SpeakerID, Status = session.Status, Location = string.IsNullOrEmpty(session.Location) ? string.Empty : session.Location }; return s; }