Yes actually there are multiple ways to do that you can do this in your Tennant.cs file as
/// <summary>
/// Represents a Tenant in the system.
/// A tenant is a isolated customer for the application
/// which has it's own users, roles and other application entities.
/// </summary>
public class Tenant : AbpTenant<Tenant, User>
{
// hide/ override the Id property from base class FullAutitedEntity<int> and decorate it [DatabaseGenerated(DatabaseGeneratedOption.None)]
[DatabaseGenerated(DatabaseGeneratedOption.None)]
public int Id { get; set; }
protected Tenant()
{
}
public Tenant(string tenancyName, string name)
: base(tenancyName, name)
{
}
}
or also in OnModelCreating Method like
modelBuilder.Entity<Tenant>()
.Property(p => p.Id)
.HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);
Hope This helps
I Recomment to enable attribute routing by default
i Have figured out the issue after a bit of searching
moving following line in PreInitialize() method before ConfigureOData method call will solve the issue
Configuration.Modules.AbpWebApi().HttpConfiguration.MapHttpAttributeRoutes();
the issue was due to the sequence of httpConfiguration calls OData config was called before it
tried to enable HTTP attribute routing in API module configuration but after that I get exception at application start. please check attached image.
public override void Initialize() { IocManager.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly());
//Automatically creates Web API controllers for all application services of the application
DynamicApiControllerBuilder
.ForAll<IApplicationService>(typeof(SpeedApplicationModule).Assembly, "app")
.Build();
<span style="color:#FF0000">Configuration.Modules.AbpWebApi().HttpConfiguration.MapHttpAttributeRoutes();</span>
Configuration.Modules.AbpWebApi().HttpConfiguration.Filters.Add(new HostAuthenticationFilter("Bearer"));
ConfigureSwaggerUi(); //Remove this line to disable swagger UI.
}
i was encountering an issue with bolerplate authentication it was throwing null refference exception in HeaderVieewModel.cs line no 28 in method GetShownLoginName() then i found out that it was due to the same port number of different abp projects and i had user logged in to some other app i tried to change the port of the web project and issue resolved
That Great! i really like your quick response
Do you plan future support for angular js