public static WordOfDayModel ToModel(this WordOfTheDayResponse @this) { var model = new WordOfDayModel(); model.Date = @this.Date.ToShortDateString(); model.Phrase = @this.Phrase.ToTransient().ToModel(); return(model); }
public ActionResult WordOfDay() { var response = new WordOfDayModel(); try { response = _phraseService.GetWordOfDay(); response.Success = true; } catch (SoapException e) { response.SetError(e); } catch (Exception e) { response.SetError(e); } return(Json(response, JsonRequestBehavior.AllowGet)); }