RE: MVC Redirect and Async Operations
And implemented and working like a charm. Thanks all. Regards, Greg Dr Greg Low 1300SQLSQL (1300 775 775) office | +61 419201410 mobile│ +61 3 8676 4913 fax SQL Down Under | Web: www.sqldownunder.comhttp://www.sqldownunder.com/ From: Greg Low (罗格雷格博士) Sent: Saturday, 1 August 2015 6:26 PM To: ozDotNet ozdotnet@ozdotnet.com Subject: RE: MVC Redirect and Async Operations Thanks guys. Makes sense. Regards, Greg Dr Greg Low 1300SQLSQL (1300 775 775) office | +61 419201410 mobile│ +61 3 8676 4913 fax SQL Down Under | Web: www.sqldownunder.comhttp://www.sqldownunder.com/ From: ozdotnet-boun...@ozdotnet.commailto:ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Corneliu I. Tusnea Sent: Saturday, 1 August 2015 6:13 PM To: ozDotNet ozdotnet@ozdotnet.commailto:ozdotnet@ozdotnet.com Subject: Re: MVC Redirect and Async Operations Task(()= { ... do stuff }).Start() On Thu, Jul 30, 2015 at 8:06 PM, Greg Low (罗格雷格博士) g...@greglow.commailto:g...@greglow.com wrote: One for the MVC brains trust if I can: I want to add some basic link redirection and logging to a test MVC site. So, for example, if I have a calls like: http://www.mytestsite.com/links/10123 http://www.mytestsite.com/links/10939 I want to redirect the caller to some other URL associated with each link number. All easy enough. However, I also want to log details to my database about that call/redirection and that’s where the issue arises. • I don’t want the redirection to wait synchronously for the DB call to complete. • If the logging didn’t work, I still want the redirection to occur. I’m presuming that as soon as I return a Response.Redirect or Response.RedirectToAction, etc, etc. that I can’t then execute code afterwards in the same call. I’ve wondered about starting an async DB operation and just not waiting for it to complete. Any suggestions on how best to achieve that outcome? Is some sort of ActionFilter a better option? Thanks in advance, Regards, Greg Dr Greg Low 1300SQLSQL (1300 775 775) office | +61 419201410tel:%2B61%20419201410 mobile│ +61 3 8676 4913tel:%2B61%203%208676%204913 fax SQL Down Under | Web: www.sqldownunder.comhttp://www.sqldownunder.com
Re: [OT] Chairs for home office
I’m most creative in the shower – I’ve figured I can get laptop high enough to not get wet, the video conf calls are still problematic though.. From: ozdotnet-boun...@ozdotnet.commailto:ozdotnet-boun...@ozdotnet.com on behalf of Stephen Price Reply-To: ozDotNet Date: Thursday, 30 July 2015 12:53 pm To: ozDotNet Subject: Re: [OT] Chairs for home office My favourite is laying down. Asleep is when I'm at my most creative, but my coding style slips a bit when I'm asleep so it's a trade off. On Wed, 29 Jul 2015 at 18:26 Bec C bec.usern...@gmail.commailto:bec.usern...@gmail.com wrote: Feelings aside I highly recommend both sitting and standing (alternate). It really helped me. Add in a few basic stretches every hour and it will help you down the road On Wed, Jul 29, 2015 at 8:16 PM, Dave Walker rangitat...@gmail.commailto:rangitat...@gmail.com wrote: Jorke feels very strongly about this. On 29 July 2015 at 22:15, Bec C bec.usern...@gmail.commailto:bec.usern...@gmail.com wrote: On Wed, Jul 29, 2015 at 5:07 PM, Jorke Odolphi jo...@jorke.netmailto:jo...@jorke.net wrote: I’ve been using a herman miller setu at home for the past month – cannot recommend it enough. No arm rests, set height and slides (on a wooden floor) - amazing chair – I’ve done a couple of 16 hour days, I would usually be physically tired and sore etc – totally gone. don’t listen to idiots that may tell you to use a stand up desk, when you have to do real work invest in a really good chair for your health – it has a 12 year warranty. Idiots? That's harsh http://livingedge.com.au/shop/226-setu-chair.html From: ozdotnet-boun...@ozdotnet.commailto:ozdotnet-boun...@ozdotnet.com on behalf of Dave Walker Reply-To: ozDotNet Date: Wednesday, 29 July 2015 4:41 pm To: ozDotNet Subject: [OT] Chairs for home office Hi all, back working in a home office and my chair is giving me conniptions. I've been looking into investing into one that's going to last me a long time. In previous companies I've used Aerons and they are awesome though really expensive. I've heard recently good things about the Steelcase Leaphttp://www.steelcase.com/products/office-chairs/leap/ as well so was wondering if anyone else had any other suggestions? Cheers, Dave
Re: [OT] Chairs for home office
This is my preferred chair for intense coding. *Greg K* On 2 August 2015 at 10:52, Jorke Odolphi jo...@jorke.net wrote: I’m most creative in the shower – I’ve figured I can get laptop high enough to not get wet, the video conf calls are still problematic though.. From: ozdotnet-boun...@ozdotnet.com on behalf of Stephen Price Reply-To: ozDotNet Date: Thursday, 30 July 2015 12:53 pm To: ozDotNet Subject: Re: [OT] Chairs for home office My favourite is laying down. Asleep is when I'm at my most creative, but my coding style slips a bit when I'm asleep so it's a trade off. On Wed, 29 Jul 2015 at 18:26 Bec C bec.usern...@gmail.com wrote: Feelings aside I highly recommend both sitting and standing (alternate). It really helped me. Add in a few basic stretches every hour and it will help you down the road On Wed, Jul 29, 2015 at 8:16 PM, Dave Walker rangitat...@gmail.com wrote: Jorke feels very strongly about this. On 29 July 2015 at 22:15, Bec C bec.usern...@gmail.com wrote: On Wed, Jul 29, 2015 at 5:07 PM, Jorke Odolphi jo...@jorke.net wrote: I’ve been using a herman miller setu at home for the past month – cannot recommend it enough. No arm rests, set height and slides (on a wooden floor) - amazing chair – I’ve done a couple of 16 hour days, I would usually be physically tired and sore etc – totally gone. don’t listen to idiots that may tell you to use a stand up desk, when you have to do real work invest in a really good chair for your health – it has a 12 year warranty. Idiots? That's harsh http://livingedge.com.au/shop/226-setu-chair.html From: ozdotnet-boun...@ozdotnet.com on behalf of Dave Walker Reply-To: ozDotNet Date: Wednesday, 29 July 2015 4:41 pm To: ozDotNet Subject: [OT] Chairs for home office Hi all, back working in a home office and my chair is giving me conniptions. I've been looking into investing into one that's going to last me a long time. In previous companies I've used Aerons and they are awesome though really expensive. I've heard recently good things about the Steelcase Leap http://www.steelcase.com/products/office-chairs/leap/ as well so was wondering if anyone else had any other suggestions? Cheers, Dave
Re: MVC Redirect and Async Operations
Task(()= { ... do stuff }).Start() From Framework 4.5 you have the slightly neater looking: Task.Run(() = { ...DoStuff... }); *GK*
Re: MVC Redirect and Async Operations
Task(()= { ... do stuff }).Start() On Thu, Jul 30, 2015 at 8:06 PM, Greg Low (罗格雷格博士) g...@greglow.com wrote: One for the MVC brains trust if I can: I want to add some basic link redirection and logging to a test MVC site. So, for example, if I have a calls like: http://www.mytestsite.com/links/10123 http://www.mytestsite.com/links/10939 I want to redirect the caller to some other URL associated with each link number. All easy enough. However, I also want to log details to my database about that call/redirection and that’s where the issue arises. · I don’t want the redirection to wait synchronously for the DB call to complete. · If the logging didn’t work, I still want the redirection to occur. I’m presuming that as soon as I return a Response.Redirect or Response.RedirectToAction, etc, etc. that I can’t then execute code afterwards in the same call. I’ve wondered about starting an async DB operation and just not waiting for it to complete. Any suggestions on how best to achieve that outcome? Is some sort of ActionFilter a better option? Thanks in advance, Regards, Greg Dr Greg Low 1300SQLSQL (1300 775 775) office | +61 419201410 mobile│ +61 3 8676 4913 fax SQL Down Under | Web: *www.sqldownunder.com http://www.sqldownunder.com*
RE: MVC Redirect and Async Operations
Thanks guys. Makes sense. Regards, Greg Dr Greg Low 1300SQLSQL (1300 775 775) office | +61 419201410 mobile│ +61 3 8676 4913 fax SQL Down Under | Web: www.sqldownunder.comhttp://www.sqldownunder.com/ From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Corneliu I. Tusnea Sent: Saturday, 1 August 2015 6:13 PM To: ozDotNet ozdotnet@ozdotnet.com Subject: Re: MVC Redirect and Async Operations Task(()= { ... do stuff }).Start() On Thu, Jul 30, 2015 at 8:06 PM, Greg Low (罗格雷格博士) g...@greglow.commailto:g...@greglow.com wrote: One for the MVC brains trust if I can: I want to add some basic link redirection and logging to a test MVC site. So, for example, if I have a calls like: http://www.mytestsite.com/links/10123 http://www.mytestsite.com/links/10939 I want to redirect the caller to some other URL associated with each link number. All easy enough. However, I also want to log details to my database about that call/redirection and that’s where the issue arises. • I don’t want the redirection to wait synchronously for the DB call to complete. • If the logging didn’t work, I still want the redirection to occur. I’m presuming that as soon as I return a Response.Redirect or Response.RedirectToAction, etc, etc. that I can’t then execute code afterwards in the same call. I’ve wondered about starting an async DB operation and just not waiting for it to complete. Any suggestions on how best to achieve that outcome? Is some sort of ActionFilter a better option? Thanks in advance, Regards, Greg Dr Greg Low 1300SQLSQL (1300 775 775) office | +61 419201410tel:%2B61%20419201410 mobile│ +61 3 8676 4913tel:%2B61%203%208676%204913 fax SQL Down Under | Web: www.sqldownunder.comhttp://www.sqldownunder.com