remove Version property from Law model and related classes - Add migration

This commit is contained in:
MahanCh
2025-08-16 13:20:47 +03:30
parent b2694ca281
commit e1ac481dc3
7 changed files with 10455 additions and 14 deletions

View File

@@ -19,7 +19,7 @@ namespace CompanyManagment.Application
{
var operation = new OperationResult();
var law = new Law(command.Title, command.Version);
var law = new Law(command.Title);
if (command.Items != null && command.Items.Any())
{
@@ -43,7 +43,7 @@ namespace CompanyManagment.Application
if (law == null)
return operation.Failed(ApplicationMessages.RecordNotFound);
law.Edit(command.Title, command.Version);
law.Edit(command.Title);
_lawRepository.SaveChanges();
return operation.Succcedded();
@@ -82,7 +82,6 @@ namespace CompanyManagment.Application
{
Id = law.id,
Title = law.Title,
Version = law.Version
};
}
@@ -93,7 +92,6 @@ namespace CompanyManagment.Application
{
Id = x.id,
Title = x.Title,
Version = x.Version,
IsActive = x.IsActive,
CreatedAt = x.CreationDate
}).ToList();
@@ -106,7 +104,6 @@ namespace CompanyManagment.Application
{
Id = law.id,
Title = law.Title,
Version = law.Version,
IsActive = law.IsActive,
CreatedAt = law.CreationDate,
Items = law.Items.Select(x => new LawItemViewModel