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
That Great! i really like your quick response