Posts by Malkaviano • 456 points
13 posts
-
-1
votes2
answers1374
viewsA: Count number of checkbox selected
You have a logic error there, cbSend is always the same object inside the loop, you are doing this: int cont = 0; if (cbSend.Checked) { cont = rtInlineBlock.Count; } The difference is I made no…
-
0
votes7
answers1682
viewsA: Make the class builder private?
I believe that most uses are when we want to maintain a DDD and the framework forces us to have default constructor, for example it is the Entity Framework that forces all persisting entities to…
-
0
votes1
answer71
viewsA: Oracleexception is not fired!
I edited the answer because the previous one had low quality. Observing the binary inside I found (THE HORROR) some possible cases of exception, one of them corroborates its placement of simple…
-
1
votes1
answer79
viewsA: Filter Longlistselector [CATEGORIES]
As I understand it is a matter of process, you will use this category selection and pull back the data from Webservice only the subcategories of the selected category. In the navigate pass the…
-
1
votes3
answers190
viewsA: Several tables that should represent a single entity
No . Net 4.0 we have the Dynamic option, I would not recommend the use lightly, but in your situation may come in handy. Create a Factory that takes as parameter the table type and returns the…
-
0
votes5
answers6761
viewsA: How to create composite key with Entity Framework 6
I edited for one more option at the end. If I understand correctly, Group rules in Subgroup, IE, the subgroup is tied to the group. Clienteid left out, because the foreign key is in the wrong entity…
-
1
votes3
answers137
viewsA: Doubt in research
Corrected. The problem is that you didn’t run the query in the BD, one possibility would be (notice it’s just an example, I don’t know the name of the field in the table): public…
-
1
votes1
answer2765
viewsA: Entity Framework Left Join
My doubt, what would be better in terms of performance? Both syntax are equal for the compiler that converts into the same code, no charge as it is Compile time. The code below is the post quoted by…
-
5
votes1
answer5672
viewsA: Left Join with lambda Groupjoin and with condition
Edit: I changed the place of Where, the logic that I made is for the collection already flattened, feel like doing another. Groupjoin already makes a left Join, the point is that after we need to…
-
1
votes2
answers503
viewsA: Use ON CASCADE DELETE in SQL
I have two tables in SQL, one called Sick and another Diagnostic, I can do all operations with the diagnostic(insert, edit and delete), but I just wish it was possible to delete the diagnoses that…
sqlanswered Malkaviano 456 -
10
votes4
answers9003
viewsA: Best way to deal with Exceptions
Complementing good answers, but something more advanced below. The . Net provides two subclasses of Exception, little known: Applicationexception and Systemexception. Systemexception is already used…
-
8
votes2
answers4996
viewsA: Memory allocation in C# - Value types and reference types
The answer accepted is very good, but a deeper dive in a few points below. Edited: I removed the recommendation about the string in the struct, it didn’t make sense. Thus, how to differentiate more…
-
0
votes2
answers122
viewsA: Winsock receiving information from the server
Jon Skeet Solution: http://www.yoda.arachsys.com/csharp/readbinary.html The problem with your solution is Read, a stream is a stream and you can never (sometimes, but should not) assume that the…
c#answered Malkaviano 456