Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "bilalhaidar"

Hello, I have a domain object that should contain 2 properties of type OrganizationUnit.

In the application in hand, I am making use of OUs in such a way that I need a concept of Region and within a Region there are Camps. So when creating a new instance of this domain object the user will select a Region (i.e. OU) and then based on the Region selection I filter out a second dropdown list containing Camps (to display only children OUs of the Region OU).

So in summary when saved in the DB, this domain object should have Ids for both Region OU and optionally Camp OU Id.

As far as properties to be added to the domain object, it will be 2 properties of type OrganizationUnit. But for DB relations, what relations I shall place here and where on which object (so that EF would handle the relations etc, ..)

Every Domain object has 1 Region (OU) and 1 or 0 Camp (OU). So the relation is 1 to Many and 1 to 0/Many. (OU Region can contain more than 1 of the domain objects).

So shall I add 1 property on the domain object of type OrganizationUnit and called Region

And add another property of type OrganizationUnit and called Camp (but nullable as the relation is 1 to 0).

Do I need to add 2 collections on OrganizationUnit object?

Many Thanks Bilal

Hello, I am running a non-multitenant application. I don't see any option where to disable the chat feature.

Can you assist, please?

Thanks Bilal

Well true, it is a convention to use forRoot and forChild. But my question why keep 2 services out of the forRoot? There will be many instances at different levels (Modules and lazy loaded modules). Why not put them all in forRoot to maintain a singleton service?

Hi Ismail, We already discussed this on GitHub.

If you direct me to how you are integrating this Date Calendar with moment and moment locale, points of integration.

Thanks

Thanks Ismail.

Im fact, I am not yet getting why the need for this function in a time canActivate is doing the job? Can you illustrate more please?

Isn't better to keep the default Angular 2 routing?

OK, I removed all reference to the Abp.Dapper nuget and then installed the correct version that works with my project. All references are okay now.

When I run the application, swagger takes over all is good.

Now, when I try to access the new application services, I get this exception in the logging file:

ERROR 2017-08-13 20:35:39,327 [35   ] Mvc.ExceptionHandling.AbpExceptionFilter - Can't create component 'Tekvention.DrcApp.Shared.CountryRegionsAppService' as it has dependencies to be satisfied.

'Tekvention.DrcApp.Shared.CountryRegionsAppService' is waiting for the following dependencies:
- Service 'Abp.Dapper.Repositories.IDapperRepository`1[[Tekvention.DrcApp.Shared.Region, Tekvention.DrcApp.Core, Version=4.1.0.0, Culture=neutral, PublicKeyToken=null]]' which was not registered.

Castle.MicroKernel.Handlers.HandlerException: Can't create component 'Tekvention.DrcApp.Shared.CountryRegionsAppService' as it has dependencies to be satisfied.

'Tekvention.DrcApp.Shared.CountryRegionsAppService' is waiting for the following dependencies:
- Service 'Abp.Dapper.Repositories.IDapperRepository`1[[Tekvention.DrcApp.Shared.Region, Tekvention.DrcApp.Core, Version=4.1.0.0, Culture=neutral, PublicKeyToken=null]]' which was not registered.

   at Castle.MicroKernel.Handlers.DefaultHandler.AssertNotWaitingForDependency()
   at Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired, Burden& burden)
   at Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context, Boolean instanceRequired)
   at Castle.MicroKernel.Handlers.AbstractHandler.Resolve(CreationContext context)
   at Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler, Type service, IDictionary additionalArguments, IReleasePolicy policy)
   at Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.Resolve(Type service, IDictionary arguments, IReleasePolicy policy)
   at Castle.MicroKernel.DefaultKernel.Resolve(Type service, IDictionary arguments)
   at Castle.Windsor.WindsorContainer.Resolve(Type service)
   at Castle.Windsor.MsDependencyInjection.ScopedWindsorServiceProvider.ResolveInstanceOrNull(Type serviceType, Boolean isOptional)
   at Castle.Windsor.MsDependencyInjection.ScopedWindsorServiceProvider.GetServiceInternal(Type serviceType, Boolean isOptional)
   at Castle.Windsor.MsDependencyInjection.ScopedWindsorServiceProvider.GetRequiredService(Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
   at Microsoft.AspNetCore.Mvc.Controllers.ServiceBasedControllerActivator.Create(ControllerContext actionContext)
   at Microsoft.AspNetCore.Mvc.Controllers.DefaultControllerFactory.CreateController(ControllerContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeNextExceptionFilterAsync>d__24.MoveNext()

Hi,

I've installed the AbpDapper nuget on both ApplicationServices and Web.Core applications.

I then added a dependency on the AbpDapperModule in the Web.Core right after the dependency for EntityFramework.

I also installed Dapper(1.50.2) and DapperExtensions. The Abp installed is 2.3.0.

I then used an IDapperRepository inside one of the ApplicationServices.

When I run the app, I get this exception:

An error occurred while starting the application.

MissingMethodException: Method not found: 'Castle.MicroKernel.Registration.ComponentRegistration`1&lt;!0&gt; Castle.MicroKernel.Registration.ComponentRegistration`1.UsingFactoryMethod(System.Converter`2&lt;Castle.MicroKernel.IKernel,!!0&gt;, Boolean)'.
Castle.Windsor.MsDependencyInjection.WindsorRegistrationHelper.RegisterServiceDescriptor(IWindsorContainer container, ServiceDescriptor serviceDescriptor)

MissingMethodException: Method not found: 'Castle.MicroKernel.Registration.ComponentRegistration`1<!0> Castle.MicroKernel.Registration.ComponentRegistration`1.UsingFactoryMethod(System.Converter`2<Castle.MicroKernel.IKernel,!!0>, Boolean)'.
Castle.Windsor.MsDependencyInjection.WindsorRegistrationHelper.RegisterServiceDescriptor(IWindsorContainer container, ServiceDescriptor serviceDescriptor)
Castle.Windsor.MsDependencyInjection.WindsorRegistrationHelper.AddServicesCollection(IWindsorContainer container, IServiceCollection services)
Castle.Windsor.MsDependencyInjection.WindsorRegistrationHelper.AddServices(IWindsorContainer container, IServiceCollection services)
Castle.Windsor.MsDependencyInjection.WindsorRegistrationHelper.CreateServiceProvider(IWindsorContainer container, IServiceCollection services)
Abp.AspNetCore.AbpServiceCollectionExtensions.AddAbp<TStartupModule>(IServiceCollection services, Action<AbpServiceOptions> optionsAction)
....Web.Startup.Startup.ConfigureServices(IServiceCollection services) in Startup.cs
+
            return services.AddAbp<DrcAppWebHostModule>(options =>
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
Microsoft.AspNetCore.Hosting.ConventionBasedStartup.ConfigureServices(IServiceCollection services)
Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureApplicationServices()
Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()

Hello, I added a migration, then requested to update the database. Tables were created successfully, but the seed data was not executed.

Then I noticed that the tables were created but missing my columns (i.e. properties).

In my case I have around 10 classes that share the same structure. Each class represents an entity that is used as reference data.

So I created a base class having those 2 properties and made those classes inheirt from that class. Something as this:

[Serializable]
    public class HostEntityBase<TPrimaryKey> : FullAuditedEntity<TPrimaryKey>
    {
        [Required]
        [StringLength(HostEntityConsts.MaxLabelLength)]
        public string Label { get; private set; }

        [StringLength(HostEntityConsts.MaxLabelDescriptionLength)]
        public virtual string Notes { get; private set; }

        public void UpdateLabel(string newLabel)
        {
            //Validate newLabel
            Check.NotNull(newLabel, nameof(newLabel));

            Label = newLabel;
        }

        public virtual void UpdateNotes(string newNotes)
        {
            Notes = newNotes;
        }

        public HostEntityBase()
        {
        }

        public HostEntityBase(string label, string notes)
        {
            UpdateLabel(label);
            UpdateNotes(notes);
        }
    }

Then each class inherits from this base and calls its constructor.

In the previous version (MVC 5/Angular js) it was working fine. But now with EF Core seems not to work. No columns were added on the tables?

Also, when I ran the app, the Seed ran. Where is that configured to do so? Usually, with update-database the Seed would run.

Thanks

Question

Hello, Is it possible to update NPM packages to the latest ones? I am using ASP.NET Core / Angular 4 app.

Thank you

Hello, I need your assistance with extending the moment typings.

I need to use this moment plugin: <a class="postlink" href="https://github.com/codebox/moment-precise-range">https://github.com/codebox/moment-precise-range</a>

This plugin adds a preciseDiff() function to the moment object.

Now, how can I add typings for this function? I need to extend the moment.d.ts so that I can start using the preciseDiff() function.

Can you assist me? That plugin has no typings and hence I need to do something about it. I tried to add the following in the typings.d.ts file.

/**
 * moment-precise-range
 */
declare module 'myMoment' {
    export namespace moment {
        export function preciseDiff(...any): any;
    }
}

Then in the code I would use something as:

import * as myMoment from 'myMoment';

myMoment.moment.preciseDiff()

No compilation errors, but when "ng serve" runs, I get this exception:

Module not found: Error: Can't resolve 'myMoment' in 'D:\Projects\...\app\sms\poc-edit'

Appreciate your help.

Thanks Bilal

Showing 101 to 110 of 635 entries