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; } }
public bool Criar(Post entity) { return(_postRepository.Criar(entity)); }