Base solution for your next web application

Activities of "thomas kristensen"

Question

Hi

I am trying to create a custom repository, which will contain all communication with DB stored procedures. However I cannot find any complete documentation on how to do this. My problem right now is how do I use a custom repository from the application layer?

I already read all documentation on the subject, but it is still not clear to me how to use a custom repository, when it has been created?

Answer

I have just defined an issue on Github for this:

<a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/issues/519">https://github.com/aspnetboilerplate/as ... issues/519</a>

Answer

In fact I am using AbpController and returnning JSON: So this line is the problem. A shared place to control it pr. request would be very nice.

<a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/blob/master/src/Abp.Web.Mvc/Web/Mvc/Controllers/Results/AbpJsonResult.cs#L60">https://github.com/aspnetboilerplate/as ... ult.cs#L60</a>

Answer

Hi

The problem is the client side component I use (Telerik) automatic binds to the data in the JSON, and it expects the naming to be as in the model on the server side, which is Pascal. So when the data arrives at the client the component cannot automatically map the data on the client side. As they are all "renamed".

An option to manually override the naming convention returned in the JSON would be really nice and usefully in this case.

Answer

Hi

Yes you are right, it is possible to define the root property on my client control, however:

ContractResolver = new CamelCasePropertyNamesContractResolver()

This is an issue, because my server model does not use camelCase, so when sending data to the client control, and the fields have been renamed (case sensitive), it does not work. We should implement a way to custom define if we want to format the response this way, also an option to define if we want result Indented, as this gives overhead when transmitting the data.

Question

Hi

We are using an existing database, and we are using multiple keys on several tables. One such table could be a product description:

KEYS ProductId, LngCode

Fields: Description.......

However Abp code first assumes a single key. How can we use multiple keys on a single table? Using natural keys is a powerfull way to avoid junk and duplicates in a table, by forcing a constraint check on the DB level.

Question

Hi

First I must say this framework is pretty impressive, a good starting point for any project.

My question is when returning a response in a controller using JSON additional properties are appended to the result as described in the documentation. My problem is I am using a third party client side component that expects another format, so I do not want AbpController to append these additional properties, I just want the raw JSON, how can I do that if I still want AbpController as my bas class?

Thanks a lot.

Showing 1 to 7 of 7 entries