« first day (12 days earlier)      last day (4939 days later) » 

6:02 PM
hi all
 
hola
 
using linq i get error executing this query

from d in Context.Documentos

where d.CodigoEquipamento == documentoDTO.CodigoEquipamento && d.Codigo == tipoEquipamentoDTO.Codigo
select new DocumentoDTO
{
Codigo = d.Codigo,
CodigoEquipamento = d.CodigoEquipamento
}

ERROR:
The entity or complex type 'DocumentoDTO' cannot be constructed in a LINQ to Entities query.
anybody can help my plz =/
 
is it because you are assigning it to a DocumentoDTO instead of an IEnemerable<DocumentoDTO> ?
 
Haha what, you can get Japanese translations of the live stream :D
 
@Joren what? where?
 
6:07 PM
public IEnumerable<DocumentoDTO> ListaDocumentos(DocumentoDTO documentoDTO, TipoEquipamentoDTO tipoEquipamentoDTO)
 
Click the Audio drop down button on the player
Select whatever language
 
cannot return a ienumerable with query filter?
 
but you can convert before you return, yes? you just need the IEnumerable for the LINQ? (Note: Not a LINQ expert by any stretch)
 
anyone here?
 
i'm pretty sure thats correct. you just need to select the first index in the IEnumerable then.
 
6:11 PM
i need any collection.
 
@jsoldi nope, nobody here but us chickens
 
FirstOrDefault?
 
anybody familiar with SSMS and know how to configure this page? msdn.microsoft.com/en-us/library/ms186472(SQL.100).aspx ~ I would ask over in the SQL rooms, but ... yeah, dead
 
@drachenstern trying to configure maintenance scripts?
 
specifically how to configure the defaults
@entens no not really, I'm tired of going through and setting lots of stuff to false
 
6:17 PM
Can someone explain me what does the parameter formattingEnabled do in Binding's constructor?
Just asked that but got no answers
 
@jsoldi have you got a SO question that we can look at?
IE, in the future, just paste the URL after you ask
0
Q: What does the parameter formattingEnabled do in Binding's constructor?

jsoldiHere's the documentation. I haven't found any explanation anywhere. There is a data binding overview but is for WPF, and I'm using WinForms. I thought what it does is to call whatever method I assign to the event Format of the Binding class, but it will call it even if I set formattingEnabled to ...

 
Do you guys think an LDAP question would be more suitable for SO or SF? The question is basically how to do a certain user lookup now that I have been able to do a successful bind.. but not sure if that's a server thing or a programming thing..
I THINK it means I am writing a certain type of LDAP search string
and then looking at the result and parsing it but that is what I am not sure about
 
LDAP? All I know is C# ;)
 
arg - Anders' talk isn't live still :S
 
I'm not asking here
I'm asking if it should be on SO or SF
im trying to avoid the 'this question should actually be on the other site' time wasting responses :)
i'll try another room lol
 
6:24 PM
@Reed should be in 6 minutes, according to the schedule
 
I'd guess SO
 
I think on SF @Shogun
Depends on what you are trying to do
 
@Joren: It's annoying - all 3 other talks are already up live
I'm hoping they didn't decide to just do the LINQ to Everything talk :S
 
They even have the pptx file up
 
@Shogun If it's more about the LDAP implementation, I'd go SF - if it's about interfacing with it in code, and parsing, I'd go SO
 
6:25 PM
I doubt they've just cancelled it entirely :P
 
ok i got the code thing all done this is more of an LDAP specific thing, ok thanks
 
@Shogun I agree with @ReedCopsey
 
oh, no - I'm sure not
 
Keynote running 20 minutes over time might have ruined some scheduling
Channel 9 should've been live from 11:00, instead it's only been live for a few minutes
 
yeah
 
6:28 PM
And if Anders' talk doesn't start on time
Then Channel 9 will run late even more, since they have Anders on at 12:30 :P
Just after his C# talk
LINQ talk just started
It's up now
 
@ReedCopsey thanks
 
The feed for Future of C# and VB I mean
And then there was some error
 
ahh, nice - it's up now
 
Well, it was up for like ten seconds :P
There is some weird short loop showing now
But at least it's something
 
yeah - at least it's obviously going to be shown :)
 
6:34 PM
Buffering ...
I think they're having some technical trouble :P
yay it started
 
woohoo - here we go :)
 
@jsoldi does that help?
 
not really
like... at all, sorry
 
@jsoldi I didn't think it would
Time for you to learn a new tool then Friend, red-gate.com/products/reflector
 
6:43 PM
Trust me that the time invested in learning that tool will help you out immensely with .NET development.
 
well I'm trying to learn C# atm as you can see
 
quick survey, those active in the room, do you use RedGate Reflector?
@jsoldi I see this ;)
 
@drachenstern of course
 
@drachenstern not at the moment
 
@entens but you have I presume?
 
6:45 PM
I admire your advancedness greatly, not helpful though
 
lol, my advancedness isn't that much further than your own, I'm sure
 
@drachenstern yup. majority of my work is still writing wrappers around crappy old DCOM objects
 
@jsoldi what I was trying to show you was that the Format method you're supplying is going to be called regardless of if you supply the flag. That's why I copy and pasted two chunks from that file for you.
The flag does something else entirely than what you might expect
You'll either need to maintain your own state (which you can do on your code) or you'll need to find another way to work with those methods. My advice is to maintain state in your own code file, since you're supplying the methods
 
Question: is there a string.format that will give me the first 25 characters of a string followed by an ellipsis?
 
But then what does it do?
I'm not trying to achieve anything in particular
 
6:48 PM
@tomdietrich Why not just use Substring()
 
I think you assumed I'm trying to achieve something
 
@jsoldi I already showed you what it does, in the response to your question.
 
anyone else here watching anders?
 
Oh OK
 
because I'm trying to apply it in a wpf binding
 
6:48 PM
@jsoldi what part am I missing?
 
I'll check that code better
 
@Benjol: Me and @Reed at least
 
Yeah @Benjol
 
i mean i could just make a converter but this would be easier
 
6:49 PM
@tomdietrich why not use the substring like he suggested? If you're wanting to chop anything longer than 25 chars, then that seems like the best answer
 
the short summary of anders' talk
 
just make an extension method for String
 
@ReedCopsey When did you write that ...
Do you have a time machine?
 
again, because I'm trying to do it directly in a binding
 
@ReedCopsey, @Joren, nice being on the 'front row' for once.
 
6:50 PM
<Expander Header="{Binding Path='Description', StringFormat={}{????}}">
 
wanted to be quick
 
@tomdietrich ahha ... that I don't know.
 
@drachenstern where does that code come from? is that something you wrote?
 
it's just a normal string format function, ignore the fancyness of wpf
 
@jsoldi no, I can tell you again tho where I got it from, if you like ...
 
6:51 PM
Ohhhhhhh!
so that's .net code!
 
"And then it's sort of delegates all the way down" – Anders
:D
 
gist: 652057, 2010-10-28 18:52:07Z
        public static int ShortVersion(this String str)
        {
            if (str.Length < 25)
                return str;

            return (str.Substring(0,25) + "...");
        }
 
@jsoldi yes
 
That's cool
 
@ReedCopsey, get ready, here it comes... :)
 
6:52 PM
@entens Yep, seems the easiest way to do it
 
Probably want return (str.Substring(0,22) + "...")
 
@jsoldi yes, that's what I'm trying to show you ...
 
Kinda expensive though
 
otherwise, it'll be 28 characters long
 
Guess I can rip off plenty of code with the 14 days trial
 
6:53 PM
I mean, I know that I can do that, that's not the question
I'm trying to avoid polluting my view model or my model
so if I can specify "only give me the first 25 characters followed by an ellipsis" in a string format, then I can do that.
 
@jsoldi ...hmmm, my copy seems to be free
nm ... it is still free, it's the pro that they charge you for
 
oh OK
yea your right, my bad
great tip by the way thanks
 
@tomdietrich i'd have to look at the syntax documentation for expansion methods, but you should be able to modify that snippet so you could do:

yourstring.ShortVersion(25) or yourstring.ShortVersion(30) and it would give you the disired length with elipsis.
 
@entens, it's (this string input, int value) and then check the value to have a length, and obviously you can do overrides so (this string input) would just call out to the second with a default of 25
 
@drachenstern yeah, thats it. seems like it should already be in an extension methods library somewhere though...
 
6:59 PM
@entens ... should be
 
hmm, if you fullscreen the PDC stream then it will use more bandwidth, giving you enough quality to actually read the text :P
 

« first day (12 days earlier)      last day (4939 days later) »