/// <summary> /// Create api model from service model /// </summary> /// <param name="model"></param> public LocalizedTextApiModel(LocalizedTextModel model) { if (model == null) { throw new ArgumentNullException(nameof(model)); } Locale = model.Locale; Text = model.Text; }
/// <summary> /// Clone /// </summary> /// <param name="model"></param> /// <returns></returns> public static LocalizedTextModel Clone(this LocalizedTextModel model) { if (model == null) { return(null); } return(new LocalizedTextModel { Locale = model.Locale, Text = model.Text }); }