Comments
Latest 25 comments as RSS feed |
Latest 25 comments as Atom feed
Re: Missing features from LINQ to SQL and Entity Framework: create tables, table name changes/prefixes
It had been a long while since the post so I am not sure if you are still looking for a solution to dynamic table name problem with LINQ.
Any way, I have just found a solution recently and like to share it with you. Check it out "http://www.codeproject.com/Articles/333249/Dynamic-Table-Mapping-for-Linq-to-SQL"
Any way, I have just found a solution recently and like to share it with you. Check it out "http://www.codeproject.com/Articles/333249/Dynamic-Table-Mapping-for-Linq-to-SQL"
The code works. I used it to make a parallel loop implementation, and saw CPUs can be clear targeted using the DistributedThread class.
The only thing to pay a bit attention is that ProcessorAffinity assignment for CPU 0, 1, 2, 3, ..., N is 1, 2, 4, 8, ... 2^N.
The only thing to pay a bit attention is that ProcessorAffinity assignment for CPU 0, 1, 2, 3, ..., N is 1, 2, 4, 8, ... 2^N.
"Code in another assembly" section was really helpful for my projects.
Thanks for sharing !
Thanks for sharing !
Worked like a charm. Needed the same for the min function, but it was easy to fix given your example.
Thanks a lot.
Thanks a lot.
Alex, are you sure you have included jquery.validate.js (or the .min version) and jquery.validate.unobtrusive.js (or the .min version)? Before you use the code I showed in the article?
In the newer ASP.NET MVC project templates, these files are not included in the _Layouts.cshtml (for Razor) file. Instead, they are referenced from individual .cshtml files when you generate an editor template (or something that required validation)?
If you use the default generated way, you need to add the code in my article AFTER those includes.
In the newer ASP.NET MVC project templates, these files are not included in the _Layouts.cshtml (for Razor) file. Instead, they are referenced from individual .cshtml files when you generate an editor template (or something that required validation)?
If you use the default generated way, you need to add the code in my article AFTER those includes.
Jannik, automatic properties have been around since C# 3.0 (.NET 3.0). I did not really point out which version of the code was written for. If you are using an earlier version of the .NET Framework (1.1 or 2.0), you will need to define a backing field for the property as follows:
private int _processorAffinity;
public int ProcessorAffinity
{
get { return this._processorAffinity; }
set { this._processorAffinity = value; }
}
This does not work for me
Get a browser error:
Uncaught TypeError: Cannot read property 'methods' of undefined
Any idea?
Get a browser error:
Uncaught TypeError: Cannot read property 'methods' of undefined
Any idea?
what about the
public int ProcessorAffinity { get; set; }
must declare a body because it is not marked abstract or extern
public int ProcessorAffinity { get; set; }
must declare a body because it is not marked abstract or extern
Thank You Very Very Much!!! I was dying for this....
Excellent Solution...Worked without a glitch !!
Excellent Solution...Worked without a glitch !!
Hi lenardg ,
I apply the same modification in all places but my service raising an exception thats see below
project Namespace: wcfService1
Interfacce : IRebuildallService
Class : RebuildallService
when i run the my wcfservice it rais this error
if i add the service reference and discover the URI then also not service is listed.please help me on this
Well my service name was service1 earlier and i renamed it after that hope this will help to u to find the solution easily.
Server Error in '/' Application.
--------------------------------------------------------------------------------
The type 'WcfService1.Service1', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: The type 'WcfService1.Service1', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found.
I apply the same modification in all places but my service raising an exception thats see below
project Namespace: wcfService1
Interfacce : IRebuildallService
Class : RebuildallService
when i run the my wcfservice it rais this error
if i add the service reference and discover the URI then also not service is listed.please help me on this
Well my service name was service1 earlier and i renamed it after that hope this will help to u to find the solution easily.
Server Error in '/' Application.
--------------------------------------------------------------------------------
The type 'WcfService1.Service1', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: The type 'WcfService1.Service1', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found.
Great article, thank you. I'm still getting the hang of MVC3 and will hopefully leverage this article when I try to serve up partial views from a separate assembly.
My only suggestion is to tweak FileExistsInZip() so that it's not case-sensitive. The Views should really be found whether one goes to /TestZipped or /testzipped, took me a few minutes to realize why the latter wasn't returning the views.
My only suggestion is to tweak FileExistsInZip() so that it's not case-sensitive. The Views should really be found whether one goes to /TestZipped or /testzipped, took me a few minutes to realize why the latter wasn't returning the views.
Hi Lenard,
I share your views and agree with your points, as .NET dev I'll (I may) be happy with the move to WP7, but as Nokia C7 user (Symbian ^3 device) I certainly am not happy. For me the reason for the move is money ( a lot of MSFT's). In the same time Symbian devices will continue to come to Europe for shore, as opposed to USA, so I don’t really care much, as I live in Europe – I’m Bulgarian. There is something also notable in this regard – have you seen the speed and quantity of presenting new Symbian ^3 devices, it’s so huge these days and this makes me thinking that Nokia really goes on internal Plan B, where they continue to develop new features for Symbian, which is great . I hope that they’ll do the same with MeeGo too, which from what I’ve seen and read for N9 is also great. There are no reasons to trough the baby with the water, I can’t see a reason to trough away an OS, in which you have invested may be hundreds of man years! And by the way Symbian ^3 is great – I really don’t see something missing in it in comparison to Android and iOS ( it’s true that I can compare only with Android personally - I have one, but no iOS device)
I wish Microsoft to open the doors for QT development on WP7 , although they don’t allow native apps, may be they can allow Nokia ones. This can bring a whole lot of good apps in WP7.
We’ll see
Best regards, Nikolay
I share your views and agree with your points, as .NET dev I'll (I may) be happy with the move to WP7, but as Nokia C7 user (Symbian ^3 device) I certainly am not happy. For me the reason for the move is money ( a lot of MSFT's). In the same time Symbian devices will continue to come to Europe for shore, as opposed to USA, so I don’t really care much, as I live in Europe – I’m Bulgarian. There is something also notable in this regard – have you seen the speed and quantity of presenting new Symbian ^3 devices, it’s so huge these days and this makes me thinking that Nokia really goes on internal Plan B, where they continue to develop new features for Symbian, which is great . I hope that they’ll do the same with MeeGo too, which from what I’ve seen and read for N9 is also great. There are no reasons to trough the baby with the water, I can’t see a reason to trough away an OS, in which you have invested may be hundreds of man years! And by the way Symbian ^3 is great – I really don’t see something missing in it in comparison to Android and iOS ( it’s true that I can compare only with Android personally - I have one, but no iOS device)
I wish Microsoft to open the doors for QT development on WP7 , although they don’t allow native apps, may be they can allow Nokia ones. This can bring a whole lot of good apps in WP7.
We’ll see
Best regards, Nikolay
Hey Lenard,
Sorry to use your blog comment system to contact you. But I have no way to email or PM you on NotebookReview site.
I saw your post about "Anyone want Spotify invites?" and I would like to get one if possible.
Thank you. and please delete this post from your blog, no matter i can get invite or not.
from another .net developer (nice blog btw) - James
Sorry to use your blog comment system to contact you. But I have no way to email or PM you on NotebookReview site.
I saw your post about "Anyone want Spotify invites?" and I would like to get one if possible.
Thank you. and please delete this post from your blog, no matter i can get invite or not.
from another .net developer (nice blog btw) - James
Have you thought about extending the code to render partial views?
I see my problem.
My local IIS site - http://localhost/ZippedVirtualPathProvider
and that is why virtualPath looks like "~/ZippedVirtualPathProvider/Views/TestZipped/Complex.cshtml"
instead of "~/Views/TestZipped/Complex.cshtml"
Thanks for your response. Great article.
My local IIS site - http://localhost/ZippedVirtualPathProvider
and that is why virtualPath looks like "~/ZippedVirtualPathProvider/Views/TestZipped/Complex.cshtml"
instead of "~/Views/TestZipped/Complex.cshtml"
Thanks for your response. Great article.
@Sergey, have to look into that. I think it might be just a configuration thing. Which version of IIS are you trying to get this to work with?
@Marco Leo, I am not sure you can remap the location of the web.config file, especially since it contains vital information for IIS as well (if you are using IIS7 or later). While I have not confirmed this, I think that you cannot remap web.config. Have to do some digging to make sure.
@Marco Leo, I am not sure you can remap the location of the web.config file, especially since it contains vital information for IIS as well (if you are using IIS7 or later). While I have not confirmed this, I think that you cannot remap web.config. Have to do some digging to make sure.
It seems that it doesn't work with IIS, however everything is fine with WebDev server. Do you have any thoughts what could be wrong? Thanks.
Sensational!
I´m from Brazil and I searched for this kind of solution during a entire day!
I researched for Custom Binding, change the .js manually, change the Decimal fields to String and populate the Decimal on the property´s setter...
I did´t found a globalization version for this js library, so, I think this is the best solution.
At line 4 of the range validation, I suggest another change to solve validation when using "." to thousand separator:
----------
var globalizedValue = value.replace(".", "").replace(",", ".");
----------
And with we associate this with a mask, we have a nice masked and validated number and currency validation:
http://www.jquerypriceformat.com/
Thank you.
I´m from Brazil and I searched for this kind of solution during a entire day!
I researched for Custom Binding, change the .js manually, change the Decimal fields to String and populate the Decimal on the property´s setter...
I did´t found a globalization version for this js library, so, I think this is the best solution.
At line 4 of the range validation, I suggest another change to solve validation when using "." to thousand separator:
----------
var globalizedValue = value.replace(".", "").replace(",", ".");
----------
And with we associate this with a mask, we have a nice masked and validated number and currency validation:
http://www.jquerypriceformat.com/
Thank you.
Hi thanks a lot for the article but in my app is not working I am using jQuery Validation Plugin 1.8.0
Do you know how to solve it in this case?
Do you know how to solve it in this case?
hello @Lenardg, I found your post really interesting and I tried to implement a similar version but in my case I just wanted to Load views from another File system location outside the web-app, without zips.
Everything works almost fine
, I am having same problem with the web-config of the view. Now my application want to get the web-config in the virtual path under the web-app root instead of my Virtual path remapped root. And for same reason it can't resolve same css files too.
I hope you can help me and future people with the same problem.
Thank again for your post i found it really useful.
Marco Leo
Everything works almost fine
, I am having same problem with the web-config of the view. Now my application want to get the web-config in the virtual path under the web-app root instead of my Virtual path remapped root. And for same reason it can't resolve same css files too.
I hope you can help me and future people with the same problem.
Thank again for your post i found it really useful.
Marco Leo
Thanks brother
I had two days with the error of the blessed coma.
lol that is the problems of Latin countries.
I had two days with the error of the blessed coma.
lol that is the problems of Latin countries.
