Base solution for your next web application

Activities of "murat.yuceer"

Question

Hi,

We need to disable Roles without remove from user. This can be done temporarily, then activated.

How can we achieve this?

Hello, After update zero version, dxdate not work. I tried with clean template v10 and v10.2.0-rc.1

just add to html <dx-date-box type="datetime" placeholder='mrb'> </dx-date-box>

package.json "devextreme": "20.2.4", "devextreme-angular": "20.2.4"

import your module DxDateBoxModule

After select date from popup twice its twrow eception you can see console,

Hi,

I have a table that named Organization which inherited from OrganizationUnit that uses by ABP.

public sealed class Organization : OrganizationUnit
    {
        //some codes..
    }

And i had overwrite the table name by adding following configuration below :

namespace Kuys.EntityFrameworkCore.EntityFrameworkCore.Configurations.Organization.Organizations
{
    public class OrganizationUnitConfiguration : IEntityTypeConfiguration<OrganizationUnit>
    {
        public void Configure(EntityTypeBuilder<OrganizationUnit> builder)
        {
            builder.ToTable("Organizations", SchemaNames.Organization);
        }
    }
}

However, since when i upgrade my abp version to latest (core 5), i'm getting the following error messages on update-database operation.

System.InvalidOperationException: To change the IDENTITY property of a column, the column needs to be dropped and recreated.
   at Microsoft.EntityFrameworkCore.Migrations.SqlServerMigrationsSqlGenerator.Generate(AlterColumnOperation operation, IModel model, MigrationCommandListBuilder builder)
   at Microsoft.EntityFrameworkCore.Migrations.MigrationsSqlGenerator.<>c.<.cctor>b__83_4(MigrationsSqlGenerator g, MigrationOperation o, IModel m, MigrationCommandListBuilder b)
   at Microsoft.EntityFrameworkCore.Migrations.MigrationsSqlGenerator.Generate(MigrationOperation operation, IModel model, MigrationCommandListBuilder builder)
   at Microsoft.EntityFrameworkCore.Migrations.MigrationsSqlGenerator.Generate(IReadOnlyList`1 operations, IModel model, MigrationsSqlGenerationOptions options)
   at Microsoft.EntityFrameworkCore.Migrations.SqlServerMigrationsSqlGenerator.Generate(IReadOnlyList`1 operations, IModel model, MigrationsSqlGenerationOptions options)
   at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.GenerateUpSql(Migration migration, MigrationsSqlGenerationOptions options)
   at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.Migrate(String targetMigration)
   at Microsoft.EntityFrameworkCore.Design.Internal.MigrationsOperations.UpdateDatabase(String targetMigration, String connectionString, String contextType)
   at Microsoft.EntityFrameworkCore.Design.OperationExecutor.UpdateDatabaseImpl(String targetMigration, String connectionString, String contextType)
   at Microsoft.EntityFrameworkCore.Design.OperationExecutor.UpdateDatabase.<>c_DisplayClass0_0.<.ctor>b_0()
   at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action)
To change the IDENTITY property of a column, the column needs to be dropped and recreated.

Do you have any suggestion to solve this problem?

Hi There,

I'm writing Select queries (not insert, update or delete) for some reports. These queries are creating by joining maybe 6-7 tables. And i'm creating repositories on EntityFrameworkCore layer for these kind of queries.

Then, I have to return my DTO for these kind of select queries. I was just wondering, should I define these kind of DTOs on the Core.Shared layer?

If so, do I need to redefine the same DTO on the Application.Shared layer, to convert it to api? (Because, there is no related reference on that layer. -it doesn't have to be by the way, of course. )

What is the best practice for these type of situations?

And also, i add all my select queries to the repository folder on the EntityFrameworkCore layer. Let's say, there is a entity that named Person. I create PersonRepository on EntityFrameworkCore layer and defined it's interface on the core layer. Do you think that there is a mistake on this?

In general, can you explain the best practice method that you will propose for such complex queries with an example, if possible?

Question

Hello, Where can i find metronic v7 source codes?

Question

Hello,

I have problem about navgation extend

For example i have two menu item

new AppMenuItem('Event_Pools', 'Pages.Main.Event.Management.EventPool', 'flaticon2-next', '/app/main/event/management/event-pool/list', ['/app/main/event/management/event-pool/person/list/{event-pool-id}']),

new AppMenuItem('Event_Pools', 'Pages.Main.Event.Management.EventPool', 'flaticon2-next', '/app/main/event/management/event-pool/list', ['/app/main/event/management/event-pool/person/list/{event-pool-id}'], [], null, { eventType: 'Meeting' })

Second menu item have query parameter but when i click menu items, navigation extend both menu items

Question

Hello, If Abp.Net.Mail.Smtp.UseDefaultCredentials settings is true (what is default i dont know and where is defined?), if so from where abp try to get mail settings?

Hello,

I need to Sending mass notifications/emails to users, Calendar system for us project, but i saw that you are already working on that, do you have plan date for this modules ?

Hello,

My entity have value object like below

public class PersonEmailConfiguration : IEntityTypeConfiguration<PersonEmail> { public void Configure(EntityTypeBuilder<PersonEmail> builder) { builder.ToTable("PersonEmails", SchemaNames.Person);

        builder.HasIndex(p => new { p.TenantId, p.PersonId });

        builder.Property(p => p.Id).ValueGeneratedNever();
        builder.Property(p => p.EmailTypeCode).IsRequired();
        builder.Property(p => p.IsPrimary).IsRequired();

        builder
            .HasOne(p => p.Person)
            .WithMany(p => p.Emails)
            .HasForeignKey(p => p.PersonId)
            .OnDelete(DeleteBehavior.NoAction);

        builder.HasOne(p => p.EmailType)
            .WithMany()
            .HasForeignKey(p => new { p.EmailTypeCode, p.TenantId })
            .HasPrincipalKey(p => new { p.Code, p.TenantId })
            .OnDelete(DeleteBehavior.NoAction);

        builder.OwnsOne(p => p.Email, p =>
        {
            p.Property(c => c.Address).IsRequired().HasColumnName("Email");
        });
    }
}

Its value object

   public class Email : ValueObject
{
    public string Address { get; }

    private Email() { }
    public Email(string address)
    {
        if (!address.Contains("@")) throw new Exception("Email is invalid");

        Address = address;
    }

    protected override IEnumerable&lt;object&gt; GetAtomicValues()
    {
        yield return Address;
    }
}

Problem is, if i update PersonEmail => Email => Address field predefined events not trigger auto I have to mark entity updated for fix problem with _personEmailRepository.UpdateAsync(email); Maybe this subject related about that => https://stackoverflow.com/questions/51416721/ef-core-owned-property-state-propagation-to-parent-entity

Hello, I need some advice for best practice sulution about dependecy resolving. I have one interface is IEdmModelProvider Multiple classes could consume this interface but these classes could contain some diffirent signature constructure parameters When client consume IEdmModelProvider, it could want to pass strategy in runtime (also client will need to pass constructure parameters), also client could select strategy when application starting (will need to pass constructure parameters)

I implemented it with factory pattern but i need to see your sulutions with boilerplate infrastructure.

Thank you

public interface IEdmModelProvider
{
    IEdmModel GetModel();
}

public class EdmModelDBContextProvider : IEdmModelProvider
{
    private readonly IServiceProvider _serviceProvider;

    public EdmModelDBContextProvider(IServiceProvider serviceProvider)
    {
        _serviceProvider = serviceProvider;
    }

    public IEdmModel GetModel()
    {
        var odataBuilder = new ODataConventionModelBuilder(_serviceProvider, true);
        odataBuilder.EntitySet&lt;UserTask&gt;("UserTasks");
        return odataBuilder.GetEdmModel();
    }
}

public class EdmModelODataUriProvider : IEdmModelProvider
{
    private readonly Uri _oDataUri;

    public EdmModelODataUriProvider(Uri oDataUri)
    {
        _oDataUri = oDataUri;
    }
    
    public IEdmModel GetModel()
    {
        var request = WebRequest.CreateHttp(_oDataUri);
        .....
        return model;
    }

}

Showing 1 to 10 of 16 entries