SimpleCQRS icon indicating copy to clipboard operation
SimpleCQRS copied to clipboard

Fixing up minor bug in the Mssql Eventstore

Open JamesTryand opened this issue 13 years ago • 10 comments

SqlServer was not working against the existing code as the insert wasn't working properly, due to mssql not accepting the datetime format given. So have explicitly converted the datetime string into a format that it likes and converted across.

There are a couple of other minor fixes to the sample project - in that the output folders were different for the sqlserver eventstore and this has now been aligned, and the signature for the config has been updated to match that in the SimpleCQRS store.

JamesTryand avatar May 15 '12 11:05 JamesTryand

Does src/EventStores/SimpleCqrs.EventStore.SqlServer/SqlServerEventStore.cs work for you?

darrencauthon avatar May 15 '12 20:05 darrencauthon

It didn't to begin with, as the system threw an error as it couldn't insert the datetime string into the sql field. so i just changed it so the insert eventdate field is converted to use the sortable datetime ( as that was the only one i could get to work in sqlserver ), i also changed the insert string to do a convert from string on the insert.

I checked this on two different windows 7 machines, one with a sqlserver 2005 database and one with a sqlserver 2008 database.

JamesTryand avatar May 15 '12 21:05 JamesTryand

Oh, sorry -- I saw you committed to the sample, but I didn't catch the commits to the actual event store immediately below.

darrencauthon avatar May 15 '12 22:05 darrencauthon

Thanks!!! I will check it out and merge it.

tyronegroves avatar May 16 '12 19:05 tyronegroves

You're welcome, once you've got that, i need to refresh the samples and push them, but in my fork you'll find a mysql eventstore based on the mssql one ( cos I need one for my hosting provider :-) ).

JamesTryand avatar May 19 '12 03:05 JamesTryand

I sorry James but I have been really busy lately. I will get this pulled in by the EOW.

tyronegroves avatar May 24 '12 21:05 tyronegroves

No Worries ;-)

I've done a mysql eventstore based on the mssql one if you're interested.

On Thu, May 24, 2012 at 10:36 PM, Tyrone Groves < [email protected]

wrote:

I sorry James but I have been really busy lately. I will get this pulled in by the EOW.

JamesTryand avatar May 24 '12 21:05 JamesTryand

He's interested.

darrencauthon avatar May 24 '12 21:05 darrencauthon

Yeah I am Darren :)

tyronegroves avatar May 24 '12 21:05 tyronegroves

I'll push it to my thing in a bit and do another pull request in a bit. (I'm reconing in about 3 hours time, just got some other stuff to sort out first). oh yeah, i use Greg Young's Simple.Testing for test harness, I've done a quick sample for it on gist, the generic one isn't working with autotest.net/mightymoose at the moment, but the non generic one is simple enough to T4-ize/snippet.

( scroll down to the bottom it's in the 'non generic example' region) of TestsAndHarness.cs

https://gist.github.com/2779864

On Thu, May 24, 2012 at 10:51 PM, Tyrone Groves < [email protected]

wrote:

Yeah I am Darren :)


Reply to this email directly or view it on GitHub: https://github.com/tyronegroves/SimpleCQRS/pull/21#issuecomment-5918609

JamesTryand avatar May 24 '12 22:05 JamesTryand