Base solution for your next web application

Activities of "ismcagdas"

Answer

Hi,

Yes, you dont need to add migration classes by yourself, you just need to run Add-Migration command.

But there is a strange thing, your last migration drops tables related to chat feature. Were you able to run chat feature ? Are those tables (AppChatMessages and AppFriendships) exists in the database ?

Answer

Just give a random name like Add-Migration "Upgrade_To_AspNetZero_1.11", I want to see if it generates someting or just an empty migration class.

If it does generates some migration code, then you should delete migrations you copied from AspNet Zero template (the ones about v1.11 for chat feature) and use only the new one generated by your Add-Migration code.

Hi,

Can you share your web api controller code ? I will try to generate same situation in a test project.

By the way, have you tried [FromBody] attribute ?

[HttpDelete]
public void Delete([FormBody]DeleteItemDto item)
{
    if (!String.IsNullOrWhiteSpace(item.Key))
        _repository.Delete(item.Key);
}
Answer

Hi,

You can pass the parameter in your url like this 'http://yoursite.com/reservation/edit/1'.

In order to do that, define your state like thisin app.js,

$stateProvider.state('editGroupReservation', {

url: '/reservation/edit/{id}',
    templateUrl: '~/App/tenant/views/reservation/edit.cshtml'
});

Then in order to get id parameter on redirected controller, you need to inject '$stateParams' into your controller. And you can get id parameter as "$stateParams.id".

Answer

Can you try to run "Add-Migration" command on the package manager console ? If you added migration classes to your project, this might be a problem.

Instead of adding new migration classes to your project, use "Add-Migration" command to generate migrations of new version.

Hi,

You can use javascript version of it, app.localize('_Day'+i).

But to make it work, define a function in your controller like this,

vm.localize = function(key){
    return app.localize(key);
}

in your view use it like this

vm.localize('__Day_'+i)
Answer

By the way, I know that it's a hard work to do. We will always try to help if you stack somewhere else during the update process :)

Answer

Hi,

In order to use AbpSession in views, we define it in the [YourProjectName]WebViewPageBase class. It should have such a code to define it.

public abstract class AbpZeroTemplateWebViewPageBase<TModel> : AbpWebViewPage<TModel>
{
    public IAbpSession AbpSession { get; private set; }
    
    protected AbpZeroTemplateWebViewPageBase()
    {
        AbpSession = IocManager.Instance.Resolve<IAbpSession>();
        LocalizationSourceName = AbpZeroTemplateConsts.LocalizationSourceName;
    }
}

Can you compare it with your version ? If it is missing, you can add it to your ViewBase and solve the problem.

I hope this helps.

Answer

Hi,

Have you seen this forum post #1073 and included github issue <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero/issues/96">https://github.com/aspnetzero/aspnet-zero/issues/96</a>.

It might give you an idea about how to upgrade to latest version with less problems.

Hi,

Seems like, you are doing it right. Can you share the error message ?

Showing 12421 to 12430 of 12723 entries