Exemplo n.º 1
0
 public ActionResult Create(UserArticle model)
 {
     var article = new UserArticle
                   {
                       Name =Utils.Transliterator.Transliterate( model.Name),
                       Title = model.Title,
                       Text = HttpUtility.HtmlDecode(model.Text)
                   };
     _context.AddToUserArticle(article);
     _context.SaveChanges();
     return RedirectToAction("Index");
 }
Exemplo n.º 2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the UserArticle EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToUserArticle(UserArticle userArticle)
 {
     base.AddObject("UserArticle", userArticle);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Create a new UserArticle object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="name">Initial value of the Name property.</param>
 /// <param name="title">Initial value of the Title property.</param>
 public static UserArticle CreateUserArticle(global::System.Int32 id, global::System.String name, global::System.String title)
 {
     UserArticle userArticle = new UserArticle();
     userArticle.Id = id;
     userArticle.Name = name;
     userArticle.Title = title;
     return userArticle;
 }