json - Date Serialization in WCF Rest Service -
I am using C # and I have the following LINQ statement
var Weekly sessions are included in db.DashboardFigures outlets from dd.s.spot (','). (X => int.Parse (x)) is equal to d.OutletN, where (d.TypeOfinformation == "sales-TW") group D new group new {d.TypeOfinformation, d.Date} Select WeeklySells () = {DT = ((DateTime) Named Group K.Det), SV = (Double) NSE Group Group. (D = & gt; D. Value_1) + (Double) New Group Endress. Sam (D => D. Value7), KPI = 1}; However, the format of the DT is coming
"\ / date (1421884800000 + 0000) \ / I have tried to convert code to dt = ((datetime) as a registered person.Data has been replaced by toastring ("dd.mm.yyyy") bit tells me that I can not convert a string into a datetime format.
Since this is a new release service, the best option is to leave WCF and RS services WCF Rest Service was a stop-pipe measurement that used to take a lot of legacy stuff. One of them was abandoned to a great extent and slow serializer is used by it.
Although it is possible to change the serializer, it is not trivial. The process is described by Carlos Figueroa and this is definitely not for beginners.
The code you posted from It turns out that Y ou are trying to create a REST service to support a BI dashboard. In this case you should also consider the top of the web API. A REST service is obtained on OData e data entities and allows customers to specify URLs, query parameters such as filters, selections, groups, etc.
This will allow your client to specify in the URL without the need for parameters and columns. The modification in your service code works on the top of the Odatea IQueryable, so the query to be executed at the end is just data Pulls out the customer from the database.
Visitors in Visual Studio, which allow Odita services to be easily exposed to any entity framework model, although Odata is not limited to EF
Can create direct query URLs or they can use a proxy generated by Visual Studio to work with LINQ syntax, or Javascript client libraries.
Finally, you have to worry about making a strange request to customers who will kill the database. You can highlight specific questions only as methods, or apply your own restrictions on IQueryable which will be exposed.
It is irrespective of doing this with paging or different dashboard pages, very cheap WCF.
PS: Excel can also read data from Odata services. Demand for access to the database should stop analysts and financial managers.
A good shock-to-blow tutorial is
Comments
Post a Comment