/// <summary> /// /// </summary> /// <param name="dao"></param> /// <returns></returns> public static MessageStatus ToObj(this DAO.MessageStatus dao) { if (dao == null) { return(null); } var obj = new MessageStatus(); obj.Code = dao.Code; obj.Date = dao.Date; obj.Info = dao.Info; obj.Value = (dao.Value == MessageStatus.DRAFT || String.IsNullOrWhiteSpace(dao.Value) ? null : dao.Value); return(obj); }
/// <summary> /// /// </summary> /// <param name="obj"></param> /// <returns></returns> public static DAO.MessageStatus ToDao(this MessageStatus obj) { if (obj == null) { return(null); } var dao = new DAO.MessageStatus(); dao.Code = obj.Code; dao.Date = obj.Date; dao.Info = obj.Info; dao.Value = (obj.Value == MessageStatus.DRAFT || String.IsNullOrWhiteSpace(obj.Value) ? null : obj.Value); return(dao); }