public int Inserir(TPerfilVO tperfilvo) { var banco = new SINAF_WebEntities(); var query = new TPerfil { IDPerfil = tperfilvo.IDPerfil, Descricao = tperfilvo.Descricao, Ativo = tperfilvo.Ativo, }; banco.AddToTPerfil(query); banco.SaveChanges(); tperfilvo.IDPerfil = query.IDPerfil; return(query.IDPerfil); }