Hi
I have an entity with multiple foreign keys (and related navigation properties). When I get the entity, all the navigation properties EXCEPT User is being returned. User is the only entity derived from ABP, all other entities are created by me. All the navigation properties are defined as 'virtual' and those are retrieved without explicit 'Include' call. The User navigation property is obtained only if I use an 'Include' call.
Is this in any way related to AbpUser?
Thank you :)
Hi
I am developing a multi tenant application , and i need to use a cache server to store my frequent used data, How do i configure/use Redis Cache Server for caching multi tenant data
Hi
I have added a common class library project which is referred by all other projects(Web,Core,Application).
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Sample.Common.EmailHandler
{
public interface IManageEmail
{
void SendEmail();
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Sample.Common.EmailHandler
{
public class ManageEmail : IManageEmail
{
public void SendEmail()
{
//Code for Sending Email
}
}
}
using Abp.Modules;
using System;
using System.Reflection;
using System.Web;
namespace Sample.Common
{
public class SampleCommonModule : AbpModule
{
public override void Initialize()
{
IocManager.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly());
}
}
}
But when I try to run project i am getting dependency injection error
{"message":"An error has occurred.","exceptionMessage":"ComponentActivator: could not proxy Abp.WebApi.Controllers.Dynamic.DynamicApiController`1[[Sample.Subscribers.ICustomerAppService, Sample.Application, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]","exceptionType":"Castle.MicroKernel.ComponentActivator.ComponentActivatorException","stackTrace":" at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateInstance(CreationContext context, ConstructorCandidate constructor, Object[] arguments)\r\n at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.Instantiate(CreationContext context)\r\n at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context)\r\n at Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context, Burden burden)\r\n at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.CreateInstance(CreationContext context, Boolean trackedExternally)\r\n at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.Resolve(CreationContext context, IReleasePolicy releasePolicy)\r\n at Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired, Burden& burden)\r\n at Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context, Boolean instanceRequired)\r\n at Castle.MicroKernel.Handlers.AbstractHandler.Resolve(CreationContext context)\r\n at Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler, Type service, IDictionary additionalArguments, IReleasePolicy policy)\r\n at Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.Resolve(Type service, IDictionary arguments, IReleasePolicy policy)\r\n at Castle.MicroKernel.DefaultKernel.Resolve(Type service, IDictionary arguments)\r\n at Castle.Windsor.WindsorContainer.Resolve(Type service)\r\n at Abp.Dependency.IocManager.Resolve(Type type) in D:\Halil\GitHub\aspnetboilerplate\src\Abp\Dependency\IocManager.cs:line 194\r\n at Abp.Dependency.IocResolverExtensions.ResolveAsDisposable[T](IIocResolver iocResolver, Type type) in D:\Halil\GitHub\aspnetboilerplate\src\Abp\Dependency\IocResolverExtensions.cs:line 32\r\n at Abp.WebApi.Controllers.AbpApiControllerActivator.Create(HttpRequestMessage request, HttpControllerDescriptor controllerDescriptor, Type controllerType) in D:\Halil\GitHub\aspnetboilerplate\src\Abp.Web.Api\WebApi\Controllers\AbpApiControllerActivator.cs:line 24\r\n at System.Web.Http.Controllers.HttpControllerDescriptor.CreateController(HttpRequestMessage request)\r\n at System.Web.Http.Dispatcher.HttpControllerDispatcher.
Hi,
I need to write some common methods for all repositories , how do i achieve this? I dont want to write custom repository for all entities . I need to use either ABP default repository or generic repository.
In RepositoryBase class I have seen an area for writing common methods
public abstract class SampleRepositoryBase<TEntity, TPrimaryKey> : EfRepositoryBase<SampleDbContext, TEntity, TPrimaryKey>
where TEntity : class, IEntity<TPrimaryKey>
{
protected SampleRepositoryBase(IDbContextProvider<SampleDbContext> dbContextProvider)
: base(dbContextProvider)
{
}
//add common methods for all repositories
}
I did wrote code here but i can't invoke it using Repository
Thank you :)
Hi
Is there any Sample ABP angular + MVC+ Entity Framework Project with Stored Procedure available ?
I would like to use Stored Procedure for getting data from Multiple tables( I don't want to use Entity Framework GetAll Method)
Hi
i am checking webapi in Postman
I did login using "http://localhost:6634/api/Account/Authenticate" and I got a token
when i try to get tenant list using "http://localhost:6634/api/services/app/tenant/GetTenants " i am getting following response
{
"success": false,
"result": null,
"error": {
"code": 0,
"message": "Current user did not login to the application!",
"details": null,
"validationErrors": null
},
"unAuthorizedRequest": true
}
Method : Post Headers - Content-Type:application/json Authorization:[Token Got from Authenticate Api ]
Please help me on this
Thank you, It worked .
Thanks ismcagdas and hikalkan
When i tried that i am getting another exception
Castle.MicroKernel.ComponentNotFoundException
No component for supporting the service RentMoji.Web.BackGroundJobs was found
Castle.MicroKernel.ComponentNotFoundException: No component for supporting the service RentMoji.Web.BackGroundJobs was found
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 Abp.Dependency.IocManager.Resolve(Type type) in D:\Halil\GitHub\aspnetboilerplate\src\Abp\Dependency\IocManager.cs:line 194
at Abp.Hangfire.HangfireIocJobActivator.ActivateJob(Type jobType) in D:\Halil\GitHub\aspnetboilerplate\src\Abp.HangFire\Hangfire\HangfireIocJobActivator.cs:line 24
at Abp.Hangfire.HangfireIocJobActivator.HangfireIocJobActivatorScope.Resolve(Type type) in D:\Halil\GitHub\aspnetboilerplate\src\Abp.HangFire\Hangfire\HangfireIocJobActivator.cs:line 48
at Hangfire.Server.CoreBackgroundJobPerformer.Perform(PerformContext context)
at Hangfire.Server.BackgroundJobPerformer.<>c__DisplayClass8_0.<PerformJobWithFilters>b__0()
at Hangfire.Server.BackgroundJobPerformer.InvokePerformFilter(IServerFilter filter, PerformingContext preContext, Func1 continuation) at Hangfire.Server.BackgroundJobPerformer.<>c__DisplayClass8_1.<PerformJobWithFilters>b__2() at Hangfire.Server.BackgroundJobPerformer.PerformJobWithFilters(PerformContext context, IEnumerable
1 filters)
at Hangfire.Server.BackgroundJobPerformer.Perform(PerformContext context)
at Hangfire.Server.Worker.PerformJob(BackgroundProcessContext context, IStorageConnection connection, String jobId)
Here is my Code
public class BackGroundJobs:IBackGroundJobs
{
public void AddJob1()
{
RecurringJob.RemoveIfExists("Job1");
RecurringJob.AddOrUpdate("Job1", () => Job1(), Cron.Daily(11, 47));
}
public void Job1()
{
DependencyResolver.Current.GetService<ISubscriberAppService>().SendEmailToSubscribers();
}
}