Exemplo n.º 1
0
 public void Adduser(string userName)
 {
     redditContext.Users.Add(new User {
         UserName = userName
     });
     redditContext.SaveChanges();
 }
Exemplo n.º 2
0
 public void AddPost(Post newPost)
 {
     newPost.Timestamp = Math.Round((DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1))).TotalSeconds).ToString();
     redditContext.Posts.Add(newPost);
     redditContext.SaveChanges();
 }