0
Method with RU List
internal List<Arquivo> GetAllArquivo()
{
using (var ctx = new TESTEntities())
{
var arquivos = (
from ver in ctx.ARQUIVO
select new Arquivo()
{
ARQUIVO_GUID = ver.ARQUIVO_GUID,
XARQUIVO = ver.XARQUIVO,
TAG = ver.TAG,
URL = ver.URL,
EXTENSAO = ver.EXTENSAO,
IS_STREAM = ver.IS_STREAM,
ULT_ARQUIVO_VERSAO_GUID = ver.ULT_ARQUIVO_VERSAO_GUID,
TIPO_DE_ARQUIVO_GUID = ver.TIPO_DE_ARQUIVO_GUID,
DIRETORIO_GUID = ver.DIRETORIO_GUID
}
).ToList();
return arquivos;
}
}
I want to access the method data to return a specific object: ex:
meuDal.GetAllArquivo().XARQUIVO
However you find nothing, I have other list methods that work, and that.
Unfortunately I can not help this, so I see nothing wrong (but I may be missing something) and I can not test this excerpt). But I have a curiosity and a hint. Why do you like to use these handles in uppercase? Did you know that for cases like this you can use one
foreach
ordinary? LINQ was not made to do what you do with it. If it is to take the data without manipulating them in any way and materialize them then and then only work with the materialized, it is better to assemble the list without LINQ. It’s easier and faster.– Maniero
When you call myDal.Getallafile() it returns a File list, if you want to get 1, do so myDal.Getallafile(). Firstordefault(). SYRUP
– PauloHDSousa
Unfortunately it is project ready that I took I can not opine yet(Then I will question about this).
– War Lock
It worked @Paulohdsousa vlw, how do I pick up a particular Dice? in java use the get(i)
– War Lock
puts as answer the solution.
– War Lock
@moustache the only thing I see of why these wrong syntax in this project c#, is that this system is a webservice, which will be consumed by old clients(Delphi programmers) and maybe they are used to this form, and have made this c# with the Attributes like this, maybe just to facilitate others, is totally wrong but I can not opine yet(Then I will seek to know)
– War Lock