public Person(string firstname, string lastname, string twitter) { Id = StaticPersistentStore.GetNextId(); FirstName = firstname; LastName = lastname; Twitter = twitter; }
public IActionResult Post([FromBody] Delta <Article> article) { var newArticle = article.ToObject(); newArticle.Id = StaticPersistentStore.GetNextId(); StaticPersistentStore.Articles.Add(newArticle); return(CreatedAtAction("Get", new { id = newArticle.Id }, newArticle)); }
public IHttpActionResult Post([FromBody] Delta <Article> article) { var newArticle = article.ToObject(); newArticle.Id = StaticPersistentStore.GetNextId(); StaticPersistentStore.Articles.Add(newArticle); return(Created(LinkForGet(newArticle.Id), newArticle)); }
public Comment(string body) { Id = StaticPersistentStore.GetNextId(); Body = body; }
public Person() { StaticPersistentStore.GetNextId(); }