Ejemplo n.º 1
0
 public Post CriarPost(Post post)
 {
     try
     {
         var postRepository = new PostRepository(bd);
         post.idUser = this.id;
         postRepository.Criar(post);
         postRepository.Persistir();
         return(post);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 2
0
 public bool Criar(Post entity)
 {
     return(_postRepository.Criar(entity));
 }