It must have something to do when I first added the last modification, I forgot to actually change the entity. Did not yet used Update-Database. I changed the entity, and used Add-Migration "" -force, using the same migration name. Update-Databse works, but nog migrator.
Now I added an empty migration again, update-database, and the migrator works. But now the new fields of the previous migration are not added to the tenant db.
now what?
Doh! stupid me... that's what you get when mixing dll's... :oops:
note: only when debugging. In a live environment, it works like a charm
hmm, not working atm.
when debugging this:
using (_unitOfWorkManager.Current.SetTenantId(2))
{
var liveStreams = _liveStreamRepository
.GetAll()
.OrderByDescending(a => a.CreationTime)
.ToList();
return new ListResultOutput<LiveStreamListDto>(liveStreams.MapTo<List<LiveStreamListDto>>());
}
I get this error:
The transaction manager has disabled its support for remote/network transactions. (Exception from HRESULT: 0x8004D024)
never mind, found it:
<a class="postlink" href="http://www.aspnetboilerplate.com/Pages/Documents/Multi-Tenancy">http://www.aspnetboilerplate.com/Pages/ ... ti-Tenancy</a>
perfect, thx
never mind, found how to do it... Created a new Dto which combines two existing Dto, mapped to the respective entity
never mind, you need an active connection to the database... :oops: :roll:
stupid me, had to set default project to EntityFramework...
but now I get this error:
Unable to generate an explicit migration because the following explicit migrations are pending: [201501041229232_InitialCreate, 201501131916251_Added_IsStatic_To_Role, 201503011513570_ModuleZero_Upgrade_For_ISuspendable, 201503070820583_Converted_IsSuspended_To_IsActive, 201503111946269_Added_Tenant_Property_Annotations, 201503122019249_Tenant_Changed_To_FullAuditedEntity_From_AuditedEntity, 201503220907591_Added_ShouldChangePasswordOnNextLogin_To_AbpUser, 201503252020192_Added_AuditLog_To_AbpZero, 201503291617289_Added_Tenancy_Filters_To_Abp_Zero, 201504021549075_User_AndAuditLog_Data_Size_Changes, 201504051650417_AbpZero_Role_SoftDelete, 201504110952594_Added_StoredFile_Entity, 201504111928297_Renamed_StoredFile_To_BinaryObject, 201505011844158_UserLogin_Property_Restrictions, 201505011844467_Create_Indexes_For_Module_Zero_Tables, 201505162037045_Renamed_BinaryObject_Table, 201506061210411_Added_AuthenticationSource_To_User, 201506141245516_AuditLog_Made_MayHaveTenant, 201509080740102_ModuleZeroUpgrade_0_6_9, 201510060756191_Added_Edition_And_Features, 201510270717447_Added_ApplicationLanguage_Entit...]. Apply the pending explicit migrations before attempting to generate a new explicit migration.
thanks for the reply, but it's a bit confusing. To be clear, I'm using multi-tenancy. But only to be future proof. At this time, I will only be using the default tenant for my portal.
I want to users to be able to subscribe to a plan, after payment through Braintree, they will have access to certain parts of the portal.
So I need a table where I store the different subscription plans, a table to store the user-subscription-payment info. I could create a new permission for every plan, that's a good idea I think. But I need to be able to manage this information through the back end. And when a user has payed for a plan, it will automatically add a record to the user-sub-payment table and set the right permission.
Do I even need features or editions, can't I just add this custom functionality without using the aspnetzero infrastructure? Not that I really want to, but I need to work fast now...deadline is coming...