示例#1
0
 public bool Criar(Entities.Categoria categoria)
 {
     try
     {
         CategoriaDAO c = new CategoriaDAO();
         return(c.Criar(categoria));
     }
     catch (Exception)
     {
         throw new NotImplementedException();
         return(false);
     }
 }
示例#2
0
        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);
            }
        }