示例#1
0
        public Message AddMessageWithCommit(Message newMessage)
        {
            _context.Add(newMessage);
            _context.SaveChanges();

            return(newMessage);
        }
示例#2
0
 public Response AddResponseWithCommit(Response newResponse)
 {
     _context.Add(newResponse);
     _context.SaveChanges();
     return(newResponse);
 }
示例#3
0
 public Post AddWithCommit(Post newPost)
 {
     _context.Add(newPost);
     _context.SaveChanges();
     return(newPost);
 }