public bool Criar(Entities.Categoria categoria) { try { CategoriaDAO c = new CategoriaDAO(); return(c.Criar(categoria)); } catch (Exception) { throw new NotImplementedException(); return(false); } }
public bool Criar(ModelView.ModelCategoria categoria) { try { CategoriaDAO c = new CategoriaDAO(); var _categoria = Mapper.Map <Entities.Categoria>(categoria); if (_categoria.nome.Equals(null)) { return(false); } return(c.Criar(_categoria)); } catch (Exception) { throw new NotImplementedException(); return(false); } }