remove Version property from Law model and related classes - Add migration
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user