Base solution for your next web application

Activities of "paddyfink"

Hello,

Like you I created also a separate web api project to host it on its own server. You can still have all the features abp.

for the Dynamic web api, you just have to add this code on your module class ( you have to create manually one and inherited from abpmodule) :

DynamicApiControllerBuilder
               .ForAll<IApplicationService>(typeof(MyAppApplicationModule).Assembly, "app")
               .WithConventionalVerbs()
               .Build();

it's a requirement for EF to be able to create poco proxies

<a class="postlink" href="http://stackoverflow.com/questions/5597760/what-effects-can-the-virtual-keyword-have-in-entity-framework-4-1-poco-code-fi">http://stackoverflow.com/questions/5597 ... co-code-fi</a>

Answer

Hello,

Indeed, the Initialize method was never called. So I checked again and I compare the project to the one created by the template. It turns out that my application class wasn't implemented AbpWebApplication. It works now. Thanks

Hey there, I'm having the same issue in a mvc controller.

public ActionResult Grid_Read([DataSourceRequest] DataSourceRequest request)
        {
            var suppliers = GetAll();

            return Json(suppliers.ToDataSourceResult(request));
        }

        [UnitOfWork]
        public virtual IEnumerable<SupplierListOutput> GetAll()
        {
           return _supplierRepository.GetAll().ProjectTo<SupplierListOutput>();
        }

I'm using kendo ui Grid component that can performs filtering, sorting, paging.... That's why I need to have a direct acces to the repository in my controller and pass a IQueryable variable in my action method .

But I stilll have the error : The operation cannot be completed because the DbContext has been disposed.

The repository is injected in the controller constructor

For those having the same issue, the solution is to set a Custom DataSource configuration. This will allow you to set a custom function for the schema.parse and return the appropriate portion of the response. For example:

@(Html.Kendo().Grid<MyModel>()
    .Name("grid")
    .Columns(columns =>
    {
        columns.Bound(typeof(string), "column1");
        columns.Bound(typeof(string), "column2");
    })
    .Pageable()
    .Sortable()
    .Scrollable()
    .DataSource(dataSource => dataSource
            .Custom()
            .ServerFiltering(true)
            .Type("aspnetmvc-ajax")
            .Transport(transport =>
                transport.Read(read => read.Action("action", "controller"))
            )
            .Schema(schema => schema
            .Model(m=>m.Id("columId"))
              .Parse(@<text>
                    function(response) {
                    return response.result;
                    }
                </text>)
            .Data("data")
            .Total("total")
            )
        )
    )

Be aware that if a property of you Model is "PropertyName" it will became "propertyName" in ajax response. so columns.Bound(p => p.PropertyName) wont' work.

Excellent. Thanks

I will follow you on twitter to be notify when there is a new version.

Hello,

I have the same problem. I can't find a way to use Kendo Grid.

@Klainer did u found a solution?

@hikalkan Is it possible to deactivate abp ajax wrapper?

Thank you.

Showing 21 to 27 of 27 entries