« first day (2004 days earlier)      last day (2936 days later) » 

12:15 AM
Anyone online?
 
12:36 AM
yea
 
user1881400
Hello.
 
hey
 
user1881400
I have a ManualResetEvent block on a thread. Does anybody know how to remove that block from a different thread? And/or a better way to make threads wait + talk to each other? I'm new to threading and C# has a billion different threading classes
 
user1881400
I thought I had it at one point, but after returning to the original thread, there was quite a lot of out-of-order code execution
 
what are you doing? IO or cpu bound stuff?
 
user1881400
12:44 AM
CPU
 
most C# developers try to stay away from threading at that low of a level, for cpu bound stuff, stephen cleary recommends Task.Run
 
user1881400
Here's my situation: I have a WPF app that presents a list of textblocks to the user and waits using myThreadBlock.WaitOne() until one of the textblocks is clicked. Each textblock has an Action passed to it that contains myThreadBlock.Set() so when one is clicked, the thread continues execution.

At the same time, there's a textbox at the bottom of the screen that waits until the user enters text, which uses an OnSubmit event handler to capture the text and handle it. The handling code runs as a separate task so it can modify GUI stuff. What happens is that when it returns, if the first thr
 
a race condition
 
user47589
sounds like
 
user1881400
I know enough to identify the problem, but I don't know how to fix it. There should only be 2 threads again; the GUI thread and the main non-gui thread used to create GUI elements on-the-fly (like textblocks) and pause so the user can select one. I structured it like this to mimic Console.Read().
 
12:52 AM
you shouldn't create gui components on a different thread, you should handle processing or io on the separate thread, and return the data to the gui thread, and have the gui thread create the components
but, you also shouldn't use threads period (manually), unless absolutely necessary, use something like task.run that creates threads behind the scenes
 
user1881400
I thought WPF doesn't allow creating the GUI on the original thread (I might just be remembering it backwards). I definitely must use threads here.
 
wait, does task.run create a new thread?
idk
 
user1881400
It does. I use Task.Factory.StartNew(...) to execute the code that handles the text.
 
so, you must use threads, but do you have to interact with them at such a low level, and not use one of the tools that are provided to you, to make working with threads easier?
yeah, i know Task.Factory.StartNew creates a new thread, don't remember for Task.RUn
 
user1881400
The link you gave me says it does.
 
12:55 AM
well, then it must, why must you work with threads directly?
I know, i'm not answering your questions, but, working with threads can be tricky, and debugging them through common language can be difficult
if this is a learning experience, it may be helpful to post a link to your code so people can see what you're doing, and not having you describe it to them, i won't have time to look at it, but others might
 
user1881400
My app is intended to simulate the Console, which I can only imagine uses threading to handle .Read() and .ReadLine(). I decided to use WPF to simulate the Console, then expanded it to enable rich outputs like forms, images, and so on. I can link to my code. I'm aware that it's very ad hoc and not presentation-ready. I'll just give you the current copy of it. And for that matter, I'm using it for a text adventure thing (in the same app for now).
 
@SteveG why the hate for using threads directly? Does it just require like Jon Skeet level skill to use it properly in a large application or are Tasks really THAT much better? I love Task myself but I always kinda thought I shouldn't be relying on it. Guess I'm wrong?
 
nah, you can do it, and, in all honesty, i think it's fun :D, but for the same reason you write apps in C# and not assembly
 
ahhh gotcha
yeah you can do some crazy stuff with them. Its like the difference between an manual and an auto I guess
 
user47589
Tasks provide a synchronization context and cancellation tokens very cleanly, something more difficult to get with plain threads.
 
1:01 AM
^ that too
 
@Amy agreed.
 
and async await, on things like task.run
 
sometimes I like to reinvent the wheel though. I feel that it helps me get a better understanding of things
 
yeah and you totally should get that better understanding, i think it's important
 
user1881400
Here you go. I follow naming conventions, but design patterns are rather missing here. Good luck :) filedropper.com/advancedconsolething
 
1:03 AM
@SteveG I found someone who didn't know why they had to increase an array's size. They just knew if it crashed increase the number. When I told them it seemed to confuse them. I don't want to be like that lol.
 
@JoshuaLamusga gist.github.com
or, just a straight up git would be awesome too, but to each their own
 
user1881400
The previous link is the .sln file and everything; I don't think a Gist has that ability.
 
user1881400
Here is the TextAdventure file: https://gist.github.com/JoshLamusga/3b0ab7cf0f9b243c4a20a87c4d95782b
Here is the TextPage file: https://gist.github.com/JoshLamusga/af34415e2d2456f8c8a461385364d3ae
And here
https://gist.github.com/JoshLamusga/3ca0d8d6ee779ba2ab72ce53c34509ee
 
user1881400
Is how the app starts. Sorry to spam the chat room there. If anybody can piece together how to resolve these issues, I'd be more than happy.
 
sorry i'm doing a little bit of late night working, can't dig in deep
 
1:21 AM
Someone developing for the windows universal platdorm here?
 
user1881400
1:33 AM
I just tested my app for 10 minutes. I think I solved my issue. Made another event handler for a new event: OnSubmitTextAfter. Subscribed to it with an anonymous method containing .Set() from ManualResetEvent so it would always return control, then handled returning to the blocked thread. Seems to be working just fine.
 
2:04 AM
sup
i have a question: how do i get: get list.where(get the sum between the first "q" (string) in list and second "q" (string) in list?
for example: new list contains: ("q", .5), ("w", 1.5), ("e", .7), ("r", .8), ("q", .5) = sum of item2 = .5 + 1.5 + .7 + .8 + .5 = 4.0
newlist.select(item1 , item2).where(get the sum of first "q" up to the next "q" in list)?
 
2:34 AM
T_T c'mon people
need this
 
Question: How can you attach an event that press Enter after doubleclick on a ListBox in c#?
NVM: used SendKeys.Send
 
nice, can u check out my question?
 
3:05 AM
bloop
thats a messed up structure
 
3:31 AM
steve!
can u take a look at my question?
 
4:02 AM
T_T someone plz help
 
4:26 AM
can you rephrase your question? its pretty hard to understand..
 
sure, 1 sec
List<Tuple<string, double>> items = new List<Tuple<string, double>>()
{
    new Tuple<string,double>("q", .5), //3.5 - .5 = 3
    new Tuple<string,double>("w", 1.5), // 3 - 1.5 = 1.5
    new Tuple<string,double>("e", .7), // .7 - 1.5 = .8
    new Tuple<string,double>("r", .8), // .8 - .8 = 0
    //start 'q', add values in Item2 until sum = <= 3.5
    //look in string, if W exists, do this dmg, otherwise dmg = q/e dmg

    new Tuple<string,double>("q", .5),
    new Tuple<string,double>("ba", .5),
all i want to do is find the first occurence of 'q', add it's value and keep adding until sum is <= 3.5
put the rest of the letters on another list, if 'w' is found, -->, otherwise -->
 
how can you verify those are sorted correctly? I mean, it'd be pretty easy to do it in two steps, 1) get all the stuff that needs to be summed, and 2) sum it up, but thats seems really fragile, considering your structure, because theres no way to verify it's sorted correctly, or sorted at all, unless this is just a minimal viable example
 
the values come randomly, no need to sort, just find the first instance of 'q',and start adding values while adding the string into a new list until sum <= 3.5
 
so, you probably won't be able to do it all in linq, but you can get the stuff you need to sum in a loop, then sum up that new collection, is this like a hw assignment or?
 
'found q in index 0' --> add it's value (.5), .5 <= 3.5, so go to next string, 'w' , add 1.5, .5 + 1.5 = 2 <= 3.5, continue
hmm il consider using a loop
i wanted to increase my learning in LINQ, been liking it so much lately
 
4:41 AM
ah gotcha
you might be able to do something like
well, nvm, that'd be dirty
.Where(x => {
   // regular function logic with an external flag to determine if you want to include it in your sub list
});
then you can just .Sum that sublist
but, if it were me, i'd just use a loop
 
im stuck in telling the loop to stop at 'q' and add until <= 3.5
usually loops are dumb and simple
 
use a flag
 
il try
 
5:02 AM
@misha130, @wadry: dotnetfiddle.net/LzZ4J5
finally I did.
 
what does that do?
 
5:16 AM
I have three classes all of which inherit from MarshalByRefObject and have the Serializable Attribute.

Only one successfully passes the AppDomain boundary
 
Morning all
 
5:56 AM
@Tomwa tl;dr but, why do you need this?
 
@TomW I have an application that is split into pieces using MAF, each individual piece can crash and fail while leaving the original application running in order to let the user save anything vital before resolving the issue.
I've fixed it now
 
Morning!
 
Cool. I have heard 'run in another appdomain' given as a solution for a buggy lib, so, fair enough
 
6:20 AM
is Amy here?
how do i get indexOF with a tuple?
indexof a string in a tuple
 
@AdanRamirez Not sure what you mean. Do you mean a list of tuples?
 
var getI = items.FindIndex(t => t.Item1 == "q");
found it :D, obtain index of an item in a tuple
umm, how do i get the next index? assuming my list contains multiple 'q's?
 
You're obtaining an index of a tuple, based on an item in it.
 
okay, how do i get alll the indexes?
and put them in a new list
 
var itemsWithIndexes = items.Select((tuple, index) => new {Index = index, Data = tuple}).Where(item => item.Data.Item1 == "q");
The first block will take your list of tuple and return a list that contains an index + a tuple. The second block, the Where, will filter it for items where the tuple's value is 'q'. You'll be left with a list of anonymously typed objects that have an Index and Data properties.
Add a final .Select(item => item.Index) to get just the indexes.
 
6:35 AM
you are a genius
im trying to solve this:
0
Q: Conditionally sum values in a list of tuples using LINQ or Loops

FluffyWuffyHello what I'm trying to do is hopefully simple, I have a List(string, decimal) and I'm trying to get the sum of the first instance of 'q', add it's value and continue until <= 3.5 is false, it would look something like this: static void Main(string[] args) { var wordList = new List<...

can u give it a look please?
 
I don't see why you'd need the indexes here.
 
i was thinking of a work-around, find all q indexes and use for loops or while looops to do the math
but still working on it T_T
 
o/
 
Simplest way is to use items.Where(tuple => tuple.Item1 == 'q') to filter the list, then go over the values and sum them.
var qItems = items.Where(tuple => tuple.Item1 == 'q');
decimal total = 0;
foreach (var val in qItems)
{
    total += qItems.Item2;
    if (total > 3.5)
        break;
}
 
@AvnerShahar-Kashtan 2smart4me!
 
6:47 AM
yea that looks good
 
0
Q: C# - Saving Image From DataGridViewImage to the Database

markI'm trying to save my images located in my datagrid with ColumnType of "DataGridViewImageColumn" passing thru class and to the class query that I have. Here's my code. // Class name public byte[] Image; // Getting the value image from datagridview int i; for(...){ byte[] image = (byte[])dgv.R...

Any help please?
 
@AvnerShahar-Kashtan yea that's good
var itemsWithIndexes = items.Select((tuple, index) => new { Index = index, Data = tuple }).Where(item => item.Data.Item1 == "q").Select(item => item.Index).ToList();
            decimal counter = 0;
            int one = 0;


            while (counter <= 3.5M)
            {
               counter = (decimal)counter + (decimal)items[itemsWithIndexes[0] + one].Item2;
                one = one + 1;
                wordList.Add(items[itemsWithIndexes[0] + one].Item1);

            }
 
Is there someone can help me?
 
on which line?
if its byte[] image = (byte[])dgv.Rows[i].Cells[7].Value; then you dont have to convert it to a memory stream and then to an Image because its already an image
just belsalesquote.Image = dgv.Rows[i].Cells[7].Value;
 
I got the error that says convertion something.
 
6:54 AM
yes but on what line
 
belsalesquote.Image = Image.FromStream(ms); // that line
ah so I have to remove the mainstream ms etc.?
 
morning
 
it says that the value of DataGridViewImage is a System.Drawing.Image
so yes
 
I simply use this
belsalesquote.Image = (byte[])dgv_salesquotesummary.Rows[i].Cells[7].Value;
and the error was gone.
 
remove byte[]
...
ok then
 
6:59 AM
I got error when I removed the byte[]
 
so belsalesquote.Image is not system.drawing.image
 
belsalesquote.Image is equal to public byte[] Image;
in the BEL class
 
Who here is versed in the ways of MSIL
 
all is well mark, just don't use such confusing variable names
 
MemoryStream ms = new MemoryStream(image);
belsalesquote.Image = Image.FromStream(ms);
Ah so I just need to remove this stuff
and turn my code into something like this.
belsalesquote.Image = (byte[])dgv.Rows[i].Cells[7].Value;
is that right? :) The error convert something has gone.
 
7:02 AM
Its right, but to be honest I have no idea why it works
 
Let me try if there would be a value when I save it using that.
 
an image shouldn't be able to convert to byte[] so easily
 
ah you got a point.
Let me try this. Anyway, if you have time, you can answer my question so I can mark it as correct answer :)
@misha130 thank you
 
nah I am fine, thanks
 
and I have no idea as well why it works but it works. haha
 
7:05 AM
most likely the grid stores the image as a byte[] in the cell
so you only convert from object to byte[]
 
Morning.
 
@misha130 oh really. I'll check if there's image value passing thru my class. :)
@RoelvanUden and @SteffenWinkler :)
Good morning fellas. :D
anyway its afternoon here. 3:08 p.m EST
 
Doubt I'll get any help on this but anyone who wants to take a crack on the following exception let me know:

System.Runtime.Serialization.SerializationException: Type is not resolved for member 'TestMod.TestMod+<>c,TestMod, Version=1.0.0.0, Culture=neutral, PublicKeyToken=49dbe5a2ec2bb427'.
   at SInterface.World.Calendar.add_OnDayChange(Action value)
 
I'd help but the mobile view has a bug which means monospaced text renders off the screen, so I can't read the whole message :)
How's that for an excuse
 
@TomW That's pretty good
I've already solved it anyways
 
7:16 AM
11 Apr 2016 02:46 Jönköping Your parcel has arrived at the local delivery depot

Oh yeah baby!
 
Here's one for everyone: I want to raise an event when an event handler is registered on an event
 
Just manually implement add and remove and launch an event on add
 
You mean implement add and remove as functions? I lose the beautiful += notation with that though don't I?
 
No. public event Action SomeEvent { add {} remove {}}
Like that.
 
@RoelvanUden All this time, and I never knew you could to that.
 
7:25 AM
Now you do :-)
 
And I'm glad I do because that makes everything simple.
 
At least someone is happy with events then ;P
 
@RoelvanUden Are they causing you grief?
 
@Tomwa GarbageCollectors hate them
 
@SteffenWinkler Hate them how? Do they just refuse to pick up after them or do they nuke the references too soon?
 
7:45 AM
consider having an object of type A and an object of type B.

B contains a List<A> property, also type A has a public event SomethingHappened. If an A object is created, it is added to B's list and B does a += myAObj.SomethingHappened;
now, the A object is set to null and is removed from B's List.
most people would think that GC should pick up the A object
but it won't
it can't
and at that point there is nothing you can do about it
you'd have to remove the event BEFORE losing any 'real' reference to that object
and to make matters worse, to remove that event reference, you've to do that from the object that has that specific reference
there is nothing like 'remove all listeners from this event'
(Well in theory you can do some ugly things with Reflection but you can always do ugly things with Reflection)
either .NET should have a native method to remove event listeners OR if an object is only referenced by events, GC should remove that object anyway.
 
Ah yeah I understand
 
it also bothers me that you can't check how many listeners are registered on an event and that you can register the same object multiple times on one event, causing the EventHandler to be called on multiple times / event
 
That may actually become a rather serious issue for me
I am loading AddIns using MAF, which register to events. Part of being an addin is that they're unloadable.
 
we had that problem in three applications. Massive memory leaks. Nobody knew why or could figure it out. Until we found tools that analyzed .NET memory footprints, one of those tools ( I think it was Red Gate's) finally had a warning about those events in it.
 
7:52 AM
Did you mean MEF?
 
I think he means MEF
 
Nope
MAF
Managed AddIn Framework
MEF does not do isolation
 
interesting
 
What is the difference?
 
If an addin crashes due to poorly written code executed in it's own app domain it will crash itself and only itself.
 
7:53 AM
133
Q: Choosing between MEF and MAF (System.AddIn)

dthrasherThe Managed Extensibility Framework (MEF) and Managed AddIn Framework (MAF, aka System.AddIn) seem to accomplish very similar tasks. According to this Stack Overflow question, Is MEF a replacement for System.Addin?, you can even use both at the same time. When would you choose to use one vs. th...

 
Hello all
 
@RoelvanUden remember when we two argued wether MEF was DI or not?
MAF proofs that MEF does DI, apparently
 
Im Osama khodrog Im Founder at jo.arabisky.com
i build the website using asp.net under C#
 
I've already had dozens of issues with the GC
 
@SteffenWinkler Oh. Ok.
 
7:54 AM
It either nukes my references when I still need them (Which I solved by keeping an unneeded list of handles)
Or it refuses to let something go.
 
yeah for me it's usually the letting go part
 
hello
i need to help
 
Can you unload AddIns at runtime using MAF? e.g. update an running application with a new version of a plugin?
 
Yes, with MAF each AddIn can be loaded into it's own AppDomain as it is in my case.
 
o/
 
7:56 AM
48
A: Choosing between MEF and MAF (System.AddIn)

user151112Having developed and shipped a MAF application. My views on MAF are somewhat jaded. MAF is a "de-coupled" system or "loosely-coupled" system at worst. MEF is "coupled" system or "loosely-couple" system at best. MAF benefits that we realized by using MAF are: Installing new or updating exis...

apparently you can
@Squiggle \o
 
Unfortunately, it seems events may throw an unexpected wrench in my plans
 
i need help i sql server
 
@IbrahimAlsurkhi Would be much easier if you went - Hello, I have a problem with xxx. To help
 
hi @Squiggle
 
@IbrahimAlsurkhi Ask your question and provide as much detail as possible.
 
7:58 AM
@IbrahimAlsurkhi PLEASE elaborate, "sql server" is really broad.
 
@SteffenWinkler tnx, looks neat
 
SELECT INV_Address.AddressId, INV_Address.FK_StakeHolderId, INV_Address.AddressName, INV_Address.Street, INV_Address.Details,
(select LKP_table.lkpId, LKP_table.lkpName, LKP_table.lkpNameAr from LKP_table,INV_Address where LKP_table.lkpId=INV_Address.FK_City)
,(select LKP_table.lkpId, LKP_table.lkpName, LKP_table.lkpNameAr from LKP_table,INV_Address where LKP_table.lkpId=INV_Address.FK_CountryId),
INV_Address.FK_CountryId, LKP_table.lkpId, LKP_table.lkpName, LKP_table.lkpNameAr
FROM INV_Address,LKP_table
how to write 3 select in one statment like this
 
join?
give an alias to your tables so your query will get much shorter?
 
morning all
 
Howdy howdy
 
8:00 AM
Yea, do xxx table as alias
 
That doesnt change anything as of now. But it makes the code easier to read.
After that, take a quick look here. w3schools.com/sql/sql_join.asp
 
but how to write select nam1,(select xx from table2 where id=name1),nam2,name3 from table1,table2
 
xx is your colName in the above snippet.
 
8:05 AM
What are you asking ?
 
When I'm finished with this I'm going to write a book about MAF and fix its lack of documentation.
 
Idk what MAF is but it sounds like a +1 @Tomwa :)
I SHOULD probably know what MAF is.
 
morning
 
@IbrahimAlsurkhi you don't need the last "table2", other than that, a query in that form should work
 
ok
what is the best query to select this
 
8:14 AM
it might look cleaner if you join the tables
 
i am writing join but the result is wrong
 
look at the page I just linked you to
 
define wrong
 
it tells you how to do joins
 
@Froxer it's an isolation based AddIn framework. Not usually needed most of the time as evidenced by it's lack of documentation.
 
8:19 AM
ok
 
@Tomwa Isn't that MEF?
 
@wadry No MEF doesn't have isolation, each addin is loaded into the same appdomain
48
A: Choosing between MEF and MAF (System.AddIn)

user151112Having developed and shipped a MAF application. My views on MAF are somewhat jaded. MAF is a "de-coupled" system or "loosely-coupled" system at worst. MEF is "coupled" system or "loosely-couple" system at best. MAF benefits that we realized by using MAF are: Installing new or updating exis...

 
@Tomwa ah ok ... not used either so I wouldn't know ... lol ... personally if I was going to do that kind of thing I still wouldn't since I already use IoC / DI pretty much everywhere I would just create a factory class and have it scan a plugin directory for implementations of that interface and then extend however in my app logic
 
@wadry it's useful as should a plugin crash, it will only crash itself and not the host.
 
that's not a hard thing to implement surely?
 
8:31 AM
@wadry Most things aren't hard to implement, at least at the 80% level. It's when you get to the last stretch of edge-cases and implementation-details that you start to curse and wish someone had already wrapped that up in a library for you.
 
lol yeh i know that feeling
get it all the time in game programming
then i go and get some code others have written and immediately start noticing a ton of limits and ultimately end up going back and starting my own code again
ah game programming ... built to plague me i think
anyone know how I might solve this ...
0
Q: Recursion in EF seems to not initialise the context at all

wadryFor some reason this "small-ish" example doesn't seem to work on my pc, am I doing something wrong? public class ResourceSection { [Key] public int Id { get; set; } [ForeignKey("ParentSection")] public int? ParentSectionId { get; set; } [Required] public string Name { g...

 
is there some way to keep the garbage collector from being retarded?
 
LOL @tomwa What do I have to look forward to ?
 
@wadry LOL CODE FIRST XD
 
All I know about the GC is that it runs in the background.
 
8:43 AM
honestly
 
@misha130 yup
its a good model, works really well
 
why is it soo boring today ?
 
@Tomwa don't allocate lots of stuff you don't need for very long
there are really trivial things you can do to prevent there being a problem
unity taught me that at least with its horrific GC based on mono 2.6
 
@Mathematics Take a 5-10 min walk outside, usually helps me with that kind of stuff.
 
also when you call update 60 times a second ... allocations can be a problem
@misha130 whats wrong with code first then?
 
8:46 AM
nothing wrong with the idea but why in the first place
how hard is it to do this as a dbo
 
@Mathematics Because it's Monday. It's common knowledge Mondays suck.
 
@misha130 why not? ... i'm a developer not a dba, know how to define things in code better than I do in SQL
also it means I can deploy the code and the db updates / deploys itself
 
Am back to work after 4 days off sick
 
Its like a proxy system you have to go through afterall
 
yeh but that's sort of the point to EF
 
8:47 AM
hi all i need one help for you guys
 
you talk to the ORM not the db
 
@misha130 if You are using a framework, than why create the db first? Defining in C# side will keep Your misbeliefs away what the framework do in the background
 
its an abstraction
@ntohl exactly ... don't second guess the framework you put in
 
But you put so much trust in to one framework that barely limps its way around
 
let it do its job
 
8:48 AM
you get such errors as your question that really dont really help you develop any sort of knowledge
 
@misha130 I actually only have a dependency on IDataContext (an interface I wrote)
I have an EF implementation of that and a few others
@misha130 this is the first time in about 5 years that i've hit this issue
 
Wherever I try to delete my datagridview row its giving me

datagridview index was out of range. must be non-negative and less than the size of the collection. parameter name: index exception


here is my delete code :

if (dataGridView1.Rows.Count > 1 && dataGridView1.SelectedRows.Count > 0 && dataGridView1.SelectedRows[0].Index != dataGridView1.Rows.Count - 1)
{
cmd.CommandText = "Delete from Ledger where AccountNumber=" + dataGridView1.SelectedRows[1].Cells["AccountNumber"].Value.ToString() + "";// Exeception coming this line
 
@misha130 well. We do so much trust on the .NET framework also
 
normally i've had questions like "what would be better way to write this query"
 
I support Micro ORMs, not huge bloated pieces of code
 
8:50 AM
@misha130 EF isn't actually that bloated ... it does a lot
 
But wait! its actually misleading
 
but that's like saying why use c# when you can code with a charged needle and a steady hand
 
It writes its own queries and doesn't really inform the user of how badly it does it so
 
aaand? Still You don't care
 
I do care when I hit 800ms latency
 
8:51 AM
check how much better performing code can You write in C++ than in C#
 
The difference between that is on the tens of the milliseconds
not hundreds
 
@misha130 If you hit an issue, debug it. It's not hard to see what queries EF generates.
 
@Atul SelectedRows[1] you know that arrays and collections in C# start at 0, right?
 
And it's very easy to write badly performing queries by hand. Just because you're using a framework doesn't mean you're not supposed to learn how to use it well, monitor it and tweak it.
 
@misha130 I have queries that i generate over 1500 lines of SQL ... 800ms is a joke ... if its that slow, write better linq queries
 
8:53 AM
Very questionable how much of the performance it gives you to control
 
@TomW : if i start [0] its giving me object refernce not set error
 
@misha130 there's actually a third party EF profiler you can get that specifically targets that problem
 
In other words, writing SQL code directly and calling it via ADO.NET is also a huge abstraction. Adding the EF layer is just another step above it.
 
@misha130 If you have a very intensive query, then you probably don't want to use an ORM to do it. Write it yourself, and then map the results to the appropriate POCOs
 
8:54 AM
I don't say you should write ADO.NET directly too
 
@Atul ok well, solve that problem
 
Time for another test.
 
@misha130 Exactly that is my point. I don't want to control the performance by using pointers, and manage them extremely efficiently. That's why I use .NET framework and C#
 
@TomW : actually im tired not getting how to fix that's why come here brother
 
I strongly believe its all like using a bloody tank to go in the forest hunting for rabbits
 
8:56 AM
@Atul whats the issue ?
 
@misha130 in my case i'm using that tank to fight a war
 
Hey if you had 5 different dynamic dbs you were making daily and then dropping, I'd believe you
 
@misha130 in a couple of cases yes
I also have a ton of static db's that I just like to have a strong toolset on top of
because when you have a linq query that's hard to put together and you see the 1500 lines of SQL it generates you start to realise the power of it
I can do stuff in linq I have no idea how to tell SQL to do efficiently, i've also given some of these SQL queries to DBA's who said stuff like "I wouldn't have done it like that" then later "oh that's odd ... its faster than my version, how did it figure that out?"
 

« first day (2004 days earlier)      last day (2936 days later) »