Is having to ignore warnings normal?

Hi there!
Let me give you some context so you can understand my question better.
I am currently trying to implement a simple basic migration setup with the OnModelCreating and the HasData method.

Let me give you the code so you can understand it better:

protected override void OnModelCreating(ModelBuilder builder)

{

builder.ApplyConfigurationsFromAssembly(Assembly.GetExecutingAssembly());

// Seed Persona

var personaSudo = new Persona

{

Id = 1,

Nombre = "sudoName",

ApellidoPaterno = "sudoApPaterno",

ApellidoMaterno = "sudoApMaterno",

Carnet = "123456",

Telefono = "123456"

};

// Hash Password

var passwordHasher = new PasswordHasher<Usuario>();

var hashedPassword = passwordHasher.HashPassword(null!, "123456");

// Seed Usuario

var usuarioSudo = new Usuario

{

Id = "dk-2dk-2kd-012kd-012kd-012k0=12kd=dk12=dk12=0dk12=0k1d2=0k12d=012",

UserName = "sudo",

Email = "[[email protected]](mailto:[email protected])",

PasswordHash = hashedPassword,

PersonaId = personaSudo.Id

};

// Seed Cargo

var cargoSudo = new Cargo

{

Id = "asdasdoqwkdpoqwdpokqwdkoqwdkpoqwodk",

Name = "Sudo",

NormalizedName = "SUDO"

};

// Seed CargoAsignado

var cargoAsignadoSudo = new CargoAsignado

{

RoleId = cargoSudo.Id,

UserId = usuarioSudo.Id

};

// Apply Seed Data

builder.Entity<Persona>().HasData(personaSudo);

builder.Entity<Usuario>().HasData(usuarioSudo);

builder.Entity<Cargo>().HasData(cargoSudo);

builder.Entity<CargoAsignado>().HasData(cargoAsignadoSudo);

base.OnModelCreating(builder);

}

As you can see fairly straight forward. Before you comment about my Id implementation. These were made on purpose trying to deal with an error I was experiencing. Spoilers it didn't fix it.

Said error was this one.

An error was generated for warning 'Microsoft.EntityFrameworkCore.Migrations.PendingModelChangesWarning': The model for context 'AppDbContext' changes each time it is built. This is usually caused by dynamic values used in a 'HasData' call (e.g. `new DateTime()`, `Guid.NewGuid()`). Add a new migration and examine its contents to locate the cause, and replace the dynamic call with a static, hardcoded value. See https://aka.ms/efcore-docs-pending-changes. This exception can be suppressed or logged by passing event ID 'RelationalEventId.PendingModelChangesWarning' to the 'ConfigureWarnings' method in 'DbContext.OnConfiguring' or 'AddDbContext'.

As you can see it seems to be related to the way I was handling the Ids. Before I was just letting them be auto generated. Then I tried having them be Guid.NewGuid().ToString() and storing them in a variable.

Soon enough I found myself frustrated and just having a random but static string with gibberish.
But the error kept coming.

That's when I chose to ignore it with this configuration.

protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)

{

optionsBuilder.ConfigureWarnings(warnings =>

warnings.Ignore(RelationalEventId.PendingModelChangesWarning));

}

After adding that piece of code my migrations and updates worked correctly even with less explicit implementations. But I still worry that maybe having a warning be ignored can't really be called a "fix".

All of these efforts are for creating something Production ready with a proper implementation of Clean Architecture.
So any guidance or advice towards that goal would be highly appreciated.
Thank you for your time!

Also in case you want to see the full code: https://github.com/yzkael/CleanArchitecture-MyOwnTakeV5