Geeks With Blogs
Łukasz Kuryło's blog July 2011 Entries
Attaching to NUnit process
Using Visual NUnit I can't debug the code and set breakpoints. So I wanted to attach the VS to the NUnit process, because then I can set the breakpoints and watch, what in variables I have. But after attached to this process I couldn't look at the breakpoints, because I had no symbol loaded, so the brakepoints were disabled with info: "The brakepoint will not currently be hit. No symbols have been loaded for this document". After some investigation, I found that, the tests and core projects must ......

Posted On Friday, July 29, 2011 7:23 PM

NUnit snippets and Visual NUnit
I decided today to go back and take another chance to NUnit, but firstly I needed to have a possibility to integrate the NUnit and VS, because launching external program to run my tests is tiring. After few minutes I fonud a nice VS plugin to integrate a Visual Studio and NUnit: it's name is Visual NUnit. I had one problem with this extension. When I wanted to fire my first NUnit test, I had an System.BadImageFormatException exception. I had to change the tests project target platform to x86. After ......

Posted On Friday, July 29, 2011 4:10 PM

showing a sql generated by NHibernate on the VS build-in console
After done mapping for my entities I wanted to test the basic CRUD operations. I stuck with a problem of inserting a data to tables in many to many relation, so I wanted to look at the generated sql by the NHibernate to find out, what is really generated to investigate the problem in my mappings. The NHibernate have a property called show-sql to show the generated statements. I enabled it in the config: var configure = new Configuration(); configure.SessionFactoryNam... configure.DataBaseIntegrati... ......

Posted On Tuesday, July 12, 2011 11:36 PM

problem with target framework set to client version
I just wanted to add a log4net library to log all the sql commands generated by NHibernate, but there was one problem. After I downloaded this library using NuGet, I could add a code from this assembly to configure the library, intellisense worked as usual, but when I wanted to compile the project, I ended with error The name 'log4net' does not exists in the current context This was new experience to me, because I have never had that strange situation. In every other solution that I created, this ......

Posted On Tuesday, July 12, 2011 9:24 PM

[NHibernate]Mapping a string field as nvarchar(MAX) in SQL Server using mapping by code
I'm diving in the NHibernate 3.2 mapping by code recently. I throught that, mapping a string with specific max length to the appropriate database table will be easy, but it wasn't. I lost some time to figure it out. At the beginning I mapped a string field in that way Property<string>(x => x.Title, x => x.Length(Int32.MaxValue)); After generating the tables in database with my schema, unfortunatelly this field was generated as a nvarchar(255) and I didn't know why. We can deal with it ......

Posted On Monday, July 11, 2011 6:50 PM

Getting in js DateTime object serialized to json on the server

I have today a little problem to parse in js a DateTime object, which I serialized to json in the acion method on the server by

return Json(messages);

In javascript, the date looks that: /Date(1309936900864)/


To parse the date in js I have used:

var parsedDate = new Date(parseInt(messages[i].CreatedDate.replace("/Date(", "").replace(")/",""), 10));


Posted On Wednesday, July 6, 2011 9:49 AM

Copyright © Łukasz Kuryło | Powered by: