اشتراک‌ها
نمونه ای از Reflection deserialization and custom attributes

So, last week one of my colleagues wanted to serialize an object along with custom property attribute to JSON. Interesting… JSON.NET by default will not allow serializing custom property attribute. So, you have to write custom JSON converter to fix this. Let’s take a look at how 

نمونه ای از Reflection deserialization and custom attributes
اشتراک‌ها
سری بهبود کارآیی برنامه‌های دات نت

- Optimising Image Processing: Reducing memory consumption and time taken by 80%
- It’s Not Your Code Vol. I: Reducing AWS S3 .NET client LOH allocations by 98%
- Strings Are Evil: Reducing memory allocations from 7.5GB to 32KB

سری بهبود کارآیی برنامه‌های دات نت
نظرات مطالب
متدهای کمکی مفید در پروژه های asp.net mvc
خطای زیر را میدهد:
LINQ to Entities does not recognize the method 'Persia.SolarDate ConvertToPersian(System.DateTime)' method, and this method cannot be translated into a store expression.  
برای ساخت مدل
من اول به روش دیتابیس فرست  EDMX را ساختم و سپس از ADO.NET DbContext Generator  استفاده کردم.

نظرات مطالب
ذخیره سازی SQL تولیدی در NH3
البته یک چیزی خیلی برایم جالب است که ایشان به Underscore معتقد است:
http://10rem.net/articles/net-naming-conventions-and-programming-standards---best-practices

ولی در MSDN ذکر شده که
"Do not apply a prefix to field names or static field names"

منبع: پاراگراف آخر http://msdn.microsoft.com/en-us/library/ta31s3bc(v=vs.71).aspx
نظرات مطالب
سیلورلایت 5 و تاریخ شمسی
سلام جناب نصیری
من تو پروژه سیلور از OData استفاده کردم. وقتی می خواستم Max یک ستون رو برگردونم با پیغام زیر مواجه شدم.
.NotSupportedException: The method 'Max' is not supported
ظاهرا بعضی از متدها موقع کوئری نوشتن (LINQ to Entities) با OData و WCF سازگار نیستن و ساپورت نمیشوند.(البته تا جایی که من سرچ کردم و یه چیزایی فهمیدم).
This topic provides information about the way in which LINQ queries are composed and executed when you are using the WCF Data Services client and limitations of using LINQ to query a data service that implements the Open Data Protocol (OData). For more information about composing and executing queries against an OData-based data service, see Querying the Data Service (WCF Data Services).
Composing LINQ Queries
LINQ enables you to compose queries against a collection of objects that implements IEnumerable. Both the Add Service Reference dialog box in Visual Studio and the DataSvcUtil.exe tool are used to generate a representation of an OData service as an entity container class that inherits from DataServiceContext, as well as objects that represent the entities returned in feeds. These tools also generate properties on the entity container class for the collections that are exposed as feeds by the service. Each of these properties of the class that encapsulates the data service return a DataServiceQuery. Because the DataServiceQuery class implements the IQueryable interface defined by LINQ, the WCF Data Services you can compose a LINQ query against feeds exposed by the data service, which are translated by the client library into a query request URI that is sent to the data service on execution.
 Note:
The set of queries expressible in the LINQ syntax is broader than those enabled in the URI syntax that is used by OData data services. A NotSupportedException is raised when the query cannot be mapped to a URI in the target data service. For more information, see the Unsupported LINQ Methods in this topic.
لطفا اگر امکانش هست راهنمائی بفرمائید و اینکه حالا که ساپورت نمیشه چه راه حلی وجود داره برای Max گرفتن.
با تشکر

بازخوردهای پروژه‌ها
خطا هنگام اجرا
Url: C:\Users\Morteza\Downloads\ExplorerPCalV.1.1\Bin\ExplorerPCal.exe 
-> ExplorerPCal, Version=1.1.0.0, Culture=neutral, PublicKeyToken=a55a2614eb2aee77
Caller: ExplorerPCal.App -> appDispatcherUnhandledException
Exception classes:
   System.NullReferenceException
   System.Reflection.TargetInvocationException
   System.Reflection.TargetInvocationException

Exception messages:
   Object reference not set to an instance of an object.
   Exception has been thrown by the target of an invocation.

   Exception has been thrown by the target of an invocation.

Stack Traces:
   at ExplorerPCal.Utils.ConfigSetGet.GetConfigData(String key)