works like charm! Thanks a lot
Hi - no - im not using one shared database for all tenants erik
Hi not sure if you have any progress with this issue but i found possible solution by using this fragment in "XXXDbContextModelCreatingExtensions.cs"
builder.Entity<TenantConnectionString>().HasKey(lc => new { lc.TenantId, lc.Name});
could you pls. confirm if that is posible solution? or it is an issue on framework side, or should I set something differently.
thanks, let me know Erik
Hi, here are details - also i simulated it again today with a new version CLI 4.2.2, putting again detailed steps:
CMD: abp new BookStore
open solution BookStore.sln in VS -> rebuild -> run BookStore.DbMigrator - all ok - initial migration has been created + database created in SQL server (SQL Server 2014)
created Book entity in domain + add into db.context + add additional information into BookStoreDbContextModelCreatingExtensions about book entity + created BookSeed (all changes in code i put below) :
Book Class: public class Book : FullAuditedAggregateRoot<Guid>, IMultiTenant { public Guid? TenantId { get; set; } [CanBeNull] public Tenant Tenant { get; set; } public string StoreName { get; set; } [Column(TypeName = "nvarchar(4000)")] public string Description { get; set; } [Column(TypeName = "nvarchar(MAX)")] public string Html { get; set; } protected Book() { } public Book(string storeName, Guid? tenantId) { StoreName = storeName; TenantId = tenantId; } }
added in BookStoreDbContext.cs: public DbSet<Book> Books { get; set; }
BookStoreConsts: public static class BookStoreConsts { public const string DbTablePrefix = "App"; public const string DbSchema = "bookstore"; }
added in BookStoreDbContextModelCreatingExtensions.cs builder.Entity<Book>(b => { b.ToTable(BookStoreConsts.DbTablePrefix + "Books", BookStoreConsts.DbSchema); b.ConfigureByConvention(); });
BooksSeed in Domain: public class BooksSeed : IDataSeedContributor,ITransientDependency { private readonly IRepository<Book, Guid> _bookRepository; public BooksSeed(IRepository<Book, Guid> bookRepository) { _bookRepository = bookRepository; } public async Task SeedAsync(DataSeedContext context) { if (await _bookRepository.GetCountAsync() <= 0) { //await _bookRepository.InsertAsync(new Book("book_name", null), autoSave: true); } } } )
add migration using -> Add-Migration "books" + Update-Database - migration applied succesfully in migration folder and also into database
run BookStore.DbMigrator - for applying a new BookSeed -> error occured:
System.InvalidOperationException: 'The entity type 'TenantConnectionString' requires a primary key to be defined. If you intended to use a keyless entity type, call 'HasNoKey' in 'OnModelCreating'. For more information on keyless entity types, see https://go.microsoft.com/fwlink/?linkid=2141943.'
I solved using this module by myself.
Correct instructions should be in your documentation:
Core of problem was that Blob Storing system has not been activated for solution.
Hallo,
I know where the documentation is located (even your link doesn't working). I have read it few times. there is no information about issues I got.
This support doesn't solve my problem! Are you sure that link above solve situation in FIleManagement module? there are no sections about 'errors', etc.
Where I could see a functional example using this module ?
Hi could you navigate me how to get logs ? - did you mean logs from abp suite or another specific detailed logs related to error?
As I said I added missing files manually, UI displayed content but when I clicked on any action on component errors are occured. Im not able to validate source code.
It will be really nice for these commercial modules (specially when you didn't activate them in some default template) to prepare separated samples specially when there can be specific issues and specific step. That save time on both sides.Otherwise I don't think any additional value why I bough commercial licence when I need to re-write whole existing module (FileManagement in that case)
Let me know
Hi, I implemented as you suggested, UI of File Management has been displayed, but nothing was working on fronend and there was js errors loged in browsers console. Did I missed anything? I read whole documentation to this, no other setting I found
Is here anybody for who this module is working? I expected that this simple module should be pretty straight forward to test your framework,
Could you pls. navigate me to right direction? could you pls. prepare sample for this module? It will be really helpull even for another commercial modules which aren't included in startup template and we can avoid situation that something is necessary to execute manually or set diferently
thanks
Hi thanks for a response,