Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP try fix migration issue #1063

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using AutoMapper;
using Orso.Arpa.Application.TranslationApplication.Model;
using Orso.Arpa.Domain.LocalizationDomain.Model;
using Orso.Arpa.Misc;

namespace Orso.Arpa.Application.TranslationApplication.Services
{
Expand All @@ -16,7 +17,7 @@ public List<Localization> Convert(TranslationDto source, List<Localization> dest
{
foreach (KeyValuePair<string, string> t in rk.Value)
{
var localization = new Localization(null, t.Key, t.Value, null, rk.Key);
var localization = new Localization(t.Key.CreateGuid(), t.Key, t.Value, null, rk.Key);
translations.Add(localization);
}
}
Expand Down
8 changes: 4 additions & 4 deletions Orso.Arpa.Domain/AddressDomain/Model/Address.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
{
public class Address : BaseEntity
{
public Address(Guid? id, CreateAddress.Command command) : this(id, (BaseAddressCreateCommand)command) {
public Address(Guid id, CreateAddress.Command command) : this(id, (BaseAddressCreateCommand)command) {
PersonId = command.PersonId;
}

public Address(Guid? id, CreateVenue.Command command) : this(id, (BaseAddressCreateCommand)command) {}
public Address(Guid id, CreateVenue.Command command) : this(id, (BaseAddressCreateCommand)command) {}

private Address(Guid? id, BaseAddressCreateCommand command) : base(id)
private Address(Guid id, BaseAddressCreateCommand command) : base(id)
{
Address1 = command.Address1;
Address2 = command.Address2;
Expand All @@ -30,7 +30,7 @@
TypeId = command.TypeId;
}

internal Address(Guid? id) : base(id)
internal Address(Guid id) : base(id)
{
}

Expand Down Expand Up @@ -73,8 +73,8 @@
public string State { get; private set; }
public string CommentInner { get; private set; }
public Guid? TypeId { get; private set; }
public virtual SelectValueMapping Type { get; private set; }

Check warning on line 76 in Orso.Arpa.Domain/AddressDomain/Model/Address.cs

View workflow job for this annotation

GitHub Actions / Build and run sonar analysis

Remove the unused private setter 'set_Type'. (https://rules.sonarsource.com/csharp/RSPEC-1144)
public Guid? PersonId { get; private set; }
public virtual Person Person { get; private set; }

Check warning on line 78 in Orso.Arpa.Domain/AddressDomain/Model/Address.cs

View workflow job for this annotation

GitHub Actions / Build and run sonar analysis

Remove the unused private setter 'set_Person'. (https://rules.sonarsource.com/csharp/RSPEC-1144)
}
}
2 changes: 1 addition & 1 deletion Orso.Arpa.Domain/AppointmentDomain/Model/Appointment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
{
public class Appointment : BaseEntity
{
public Appointment(Guid? id, CreateAppointment.Command command) : base(id)
public Appointment(Guid id, CreateAppointment.Command command) : base(id)
{
CategoryId = command.CategoryId;
StartTime = command.StartTime;
Expand Down Expand Up @@ -76,21 +76,21 @@
#region Reference

public Guid? CategoryId { get; private set; }
public virtual SelectValueMapping Category { get; private set; }

Check warning on line 79 in Orso.Arpa.Domain/AppointmentDomain/Model/Appointment.cs

View workflow job for this annotation

GitHub Actions / Build and run sonar analysis

Remove the unused private setter 'set_Category'. (https://rules.sonarsource.com/csharp/RSPEC-1144)

public Guid? SalaryId { get; private set; }
public virtual SelectValueMapping Salary { get; private set; }

Check warning on line 82 in Orso.Arpa.Domain/AppointmentDomain/Model/Appointment.cs

View workflow job for this annotation

GitHub Actions / Build and run sonar analysis

Remove the unused private setter 'set_Salary'. (https://rules.sonarsource.com/csharp/RSPEC-1144)

public Guid? SalaryPatternId { get; private set; }
public virtual SelectValueMapping SalaryPattern { get; private set; }

Check warning on line 85 in Orso.Arpa.Domain/AppointmentDomain/Model/Appointment.cs

View workflow job for this annotation

GitHub Actions / Build and run sonar analysis

Remove the unused private setter 'set_SalaryPattern'. (https://rules.sonarsource.com/csharp/RSPEC-1144)

public Guid? VenueId { get; private set; }
public virtual Venue Venue { get; private set; }

Check warning on line 88 in Orso.Arpa.Domain/AppointmentDomain/Model/Appointment.cs

View workflow job for this annotation

GitHub Actions / Build and run sonar analysis

Remove the unused private setter 'set_Venue'. (https://rules.sonarsource.com/csharp/RSPEC-1144)

public Guid? ExpectationId { get; private set; }
public virtual SelectValueMapping Expectation { get; private set; }

Check warning on line 91 in Orso.Arpa.Domain/AppointmentDomain/Model/Appointment.cs

View workflow job for this annotation

GitHub Actions / Build and run sonar analysis

Remove the unused private setter 'set_Expectation'. (https://rules.sonarsource.com/csharp/RSPEC-1144)

public Guid? AuditionId { get; private set; }

Check warning on line 93 in Orso.Arpa.Domain/AppointmentDomain/Model/Appointment.cs

View workflow job for this annotation

GitHub Actions / Build and run sonar analysis

Remove the unused private setter 'set_AuditionId'. (https://rules.sonarsource.com/csharp/RSPEC-1144)
public virtual Audition Audition { get; private set; }

#endregion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Orso.Arpa.Domain.AppointmentDomain.Model
{
public class AppointmentParticipation : BaseEntity
{
public AppointmentParticipation(Guid? id, CreateAppointmentParticipation.Command command) : base(id)
public AppointmentParticipation(Guid id, CreateAppointmentParticipation.Command command) : base(id)
{
PersonId = command.PersonId;
AppointmentId = command.AppointmentId;
Expand Down
4 changes: 2 additions & 2 deletions Orso.Arpa.Domain/AppointmentDomain/Model/AppointmentRoom.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ namespace Orso.Arpa.Domain.AppointmentDomain.Model
{
public class AppointmentRoom : BaseEntity
{
public AppointmentRoom(Guid? id, Appointment appointment, Room room) : base(id)
public AppointmentRoom(Guid? id, Appointment appointment, Room room) : base(id ?? Guid.NewGuid())
{
Appointment = appointment;
Room = room;
}

public AppointmentRoom(Guid appointmentId, Guid roomId)
public AppointmentRoom(Guid? id, Guid appointmentId, Guid roomId) : base(id ?? Guid.NewGuid())
{
AppointmentId = appointmentId;
RoomId = roomId;
Expand Down
2 changes: 1 addition & 1 deletion Orso.Arpa.Domain/ClubDomain/Model/Club.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
/// </summary>
public class Club : BaseEntity
{
public Club(Guid? id, CreateClub.Command command) : base(id)
public Club(Guid id, CreateClub.Command command) : base(id)
{
Name = command.Name;
// Address = new Address(command);

Check warning on line 17 in Orso.Arpa.Domain/ClubDomain/Model/Club.cs

View workflow job for this annotation

GitHub Actions / Build and run sonar analysis

Remove this commented out code. (https://rules.sonarsource.com/csharp/RSPEC-125)
}

protected Club()
Expand All @@ -24,7 +24,7 @@
[CascadingSoftDelete]
public virtual ICollection<ClubMembershipType> MembershipTypes { get; private set; } = new HashSet<ClubMembershipType>();
public string Name { get; set; }
// public Address Address { get; set; } = new Address();

Check warning on line 27 in Orso.Arpa.Domain/ClubDomain/Model/Club.cs

View workflow job for this annotation

GitHub Actions / Build and run sonar analysis

Remove this commented out code. (https://rules.sonarsource.com/csharp/RSPEC-125)

[CascadingSoftDelete]
public virtual ICollection<ClubMembershipProfile> Members { get; private set; } = new HashSet<ClubMembershipProfile>();
Expand Down
2 changes: 1 addition & 1 deletion Orso.Arpa.Domain/ClubDomain/Model/ClubMemberhipType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Orso.Arpa.Domain.ClubDomain.Model
/// </summary>
public class ClubMembershipType : BaseEntity
{
public ClubMembershipType(Guid? id, CreateClubMembershipType.Command command) : base(id)
public ClubMembershipType(Guid id, CreateClubMembershipType.Command command) : base(id)
{
ClubId = command.ClubId;
Name = command.Name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Orso.Arpa.Domain.ClubDomain.Model
/// </summary>
public class ClubMembershipContribution : BaseEntity, IVersionedEntity
{
public ClubMembershipContribution(Guid? id, CreateClubMembershipContribution.Command command) : base(id)
public ClubMembershipContribution(Guid id, CreateClubMembershipContribution.Command command) : base(id)
{
ContributionPerYearInEuro = command.ContributionPerYearInEuro;
ValidFrom = command.ValidFrom;
Expand Down
2 changes: 1 addition & 1 deletion Orso.Arpa.Domain/ClubDomain/Model/ClubMembershipSubType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Orso.Arpa.Domain.ClubDomain.Model
{
public class ClubMembershipSubType : BaseEntity
{
public ClubMembershipSubType(Guid? id, CreateClubMembershipSubType.Command command) : base(id)
public ClubMembershipSubType(Guid id, CreateClubMembershipSubType.Command command) : base(id)
{
MemberhsipTypeId = command.MemberhsipTypeId;
Name = command.Name;
Expand Down
2 changes: 1 addition & 1 deletion Orso.Arpa.Domain/LocalizationDomain/Model/Localization.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Orso.Arpa.Domain.LocalizationDomain.Model
{
public class Localization : BaseEntity
{
public Localization(Guid? id, string key, string text, string localizationCulture, string resourceKey) : base(id)
public Localization(Guid id, string key, string text, string localizationCulture, string resourceKey) : base(id)
{
Key = key;
Text = text;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Orso.Arpa.Domain.MusicianProfileDomain.Model
{
public class CurriculumVitaeReference : BaseEntity
{
public CurriculumVitaeReference(Guid? id, CreateCurriculumVitaeReference.Command command) : base(id)
public CurriculumVitaeReference(Guid id, CreateCurriculumVitaeReference.Command command) : base(id)
{
TimeSpan = command.TimeSpan;
Institution = command.Institution;
Expand All @@ -18,7 +18,7 @@ public CurriculumVitaeReference(Guid? id, CreateCurriculumVitaeReference.Command
MusicianProfileId = command.MusicianProfileId;
}

internal CurriculumVitaeReference(Guid? id) : base(id)
internal CurriculumVitaeReference(Guid id) : base(id)
{
}

Expand Down
4 changes: 2 additions & 2 deletions Orso.Arpa.Domain/MusicianProfileDomain/Model/Education.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Orso.Arpa.Domain.MusicianProfileDomain.Model
{
public class Education : BaseEntity
{
public Education(Guid? id, CreateEducation.Command command) : base(id)
public Education(Guid id, CreateEducation.Command command) : base(id)
{
TimeSpan = command.TimeSpan;
Institution = command.Institution;
Expand All @@ -18,7 +18,7 @@ public Education(Guid? id, CreateEducation.Command command) : base(id)
MusicianProfileId = command.MusicianProfileId;
}

internal Education(Guid? id) : base(id)
internal Education(Guid id) : base(id)
{
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace Orso.Arpa.Domain.MusicianProfileDomain.Model
{
public class MusicianProfile : BaseEntity
{
public MusicianProfile(CreateMusicianProfile.Command command, bool isMainProfile, Guid? id = null) : base(id)
public MusicianProfile(CreateMusicianProfile.Command command, bool isMainProfile, Guid? id = null) : base(id ?? Guid.NewGuid())
{
LevelAssessmentInner = command.LevelAssessmentInner;
LevelAssessmentTeam = command.LevelAssessmentTeam;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Orso.Arpa.Domain.MusicianProfileDomain.Model
[HardDelete]
public class MusicianProfileDeactivation : BaseEntity
{
public MusicianProfileDeactivation(Guid? id, CreateMusicianProfileDeactivation.Command command) : base(id)
public MusicianProfileDeactivation(Guid id, CreateMusicianProfileDeactivation.Command command) : base(id)
{
DeactivationStart = command.DeactivationStart;
Purpose = command.Purpose;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ namespace Orso.Arpa.Domain.MusicianProfileDomain.Model
{
public class MusicianProfileDocument : BaseEntity
{
public MusicianProfileDocument(Guid? id, MusicianProfile musicianProfile, SelectValueMapping selectValueMapping) : base(id)
public MusicianProfileDocument(Guid? id, MusicianProfile musicianProfile, SelectValueMapping selectValueMapping) : base(id ?? Guid.NewGuid())
{
MusicianProfile = musicianProfile;
SelectValueMapping = selectValueMapping;
}

public MusicianProfileDocument(Guid musicianProfileId, Guid selectValueMappingId, Guid? id = null) : base(id)
public MusicianProfileDocument(Guid musicianProfileId, Guid selectValueMappingId, Guid? id = null) : base(id ?? Guid.NewGuid())
{
MusicianProfileId = musicianProfileId;
SelectValueMappingId = selectValueMappingId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Orso.Arpa.Domain.MusicianProfileDomain.Model
{
public class MusicianProfilePositionInner : BaseEntity
{
public MusicianProfilePositionInner(Guid selectValueSectionId, Guid musicianProfileId, Guid? id = null) : base(id)
public MusicianProfilePositionInner(Guid selectValueSectionId, Guid musicianProfileId, Guid? id = null) : base(id ?? Guid.NewGuid())
{
SelectValueSectionId = selectValueSectionId;
MusicianProfileId = musicianProfileId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Orso.Arpa.Domain.MusicianProfileDomain.Model
{
public class MusicianProfilePositionTeam : BaseEntity
{
public MusicianProfilePositionTeam(Guid selectValueSectionId, Guid musicianProfileId, Guid? id = null) : base(id)
public MusicianProfilePositionTeam(Guid selectValueSectionId, Guid musicianProfileId, Guid? id = null) : base(id ?? Guid.NewGuid())
{
SelectValueSectionId = selectValueSectionId;
MusicianProfileId = musicianProfileId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ protected MusicianProfileSection()
{
}

public MusicianProfileSection(Guid? id, CreateMusicianProfileSection.Command command) : base(id)
public MusicianProfileSection(Guid id, CreateMusicianProfileSection.Command command) : base(id)
{
LevelAssessmentInner = command.LevelAssessmentInner;
LevelAssessmentTeam = command.LevelAssessmentTeam;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Orso.Arpa.Domain.MusicianProfileDomain.Model
{
public class PreferredGenre : BaseEntity
{
public PreferredGenre(Guid? id, MusicianProfile musicianProfile, SelectValueMapping selectValueMapping) : base(id)
public PreferredGenre(Guid id, MusicianProfile musicianProfile, SelectValueMapping selectValueMapping) : base(id)
{
MusicianProfile = musicianProfile;
SelectValueMapping = selectValueMapping;
Expand Down
2 changes: 1 addition & 1 deletion Orso.Arpa.Domain/NewsDomain/Model/News.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Orso.Arpa.Domain.NewsDomain.Model;

public class News : BaseEntity
{
public News(Guid? id, CreateNews.Command command) : base(id)
public News(Guid id, CreateNews.Command command) : base(id)
{
Title = command.Title;
Content = command.Content;
Expand Down
2 changes: 1 addition & 1 deletion Orso.Arpa.Domain/PersonDomain/Model/BankAccount.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Orso.Arpa.Domain.PersonDomain.Model
{
public class BankAccount : BaseEntity
{
public BankAccount(Guid? id, CreateBankAccount.Command command) : base(id)
public BankAccount(Guid id, CreateBankAccount.Command command) : base(id)
{
Iban = command.Iban;
Bic = command.Bic;
Expand Down
4 changes: 2 additions & 2 deletions Orso.Arpa.Domain/PersonDomain/Model/ContactDetail.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Orso.Arpa.Domain.PersonDomain.Model
{
public class ContactDetail : BaseEntity
{
public ContactDetail(Guid? id, CreateContactDetail.Command command) : base(id)
public ContactDetail(Guid? id, CreateContactDetail.Command command) : base(id ?? Guid.NewGuid())
{
Key = command.Key;
Value = command.Value;
Expand All @@ -18,7 +18,7 @@ public ContactDetail(Guid? id, CreateContactDetail.Command command) : base(id)
PersonId = command.PersonId;
}

public ContactDetail(Guid? id, CreateMyContactDetail.Command command) : base(id)
public ContactDetail(Guid id, CreateMyContactDetail.Command command) : base(id)
{
Key = command.Key;
Value = command.Value;
Expand Down
4 changes: 2 additions & 2 deletions Orso.Arpa.Domain/PersonDomain/Model/Person.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace Orso.Arpa.Domain.PersonDomain.Model
{
public class Person : BaseEntity
{
public Person(Guid? id, CreatePerson.Command command) : base(id)
public Person(Guid id, CreatePerson.Command command) : base(id)
{
GivenName = command.GivenName;
Surname = command.Surname;
Expand All @@ -33,7 +33,7 @@ public Person(Guid? id, CreatePerson.Command command) : base(id)
GeneralPreference = command.GeneralPreference;
}

public Person(Guid? id, RegisterUser.Command command) : base(id)
public Person(Guid id, RegisterUser.Command command) : base(id)
{
GivenName = command.GivenName;
Surname = command.Surname;
Expand Down
4 changes: 2 additions & 2 deletions Orso.Arpa.Domain/PersonDomain/Model/PersonSection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ namespace Orso.Arpa.Domain.PersonDomain.Model
{
public class PersonSection : BaseEntity
{
public PersonSection(Guid? id, Person person, Section section) : base(id)
public PersonSection(Guid? id, Person person, Section section) : base(id ?? Guid.NewGuid())
{
Person = person;
Section = section;
}

public PersonSection(Guid? id, Guid personId, Guid sectionId) : base(id)
public PersonSection(Guid? id, Guid personId, Guid sectionId) : base(id ?? Guid.NewGuid())
{
PersonId = personId;
SectionId = sectionId;
Expand Down
2 changes: 1 addition & 1 deletion Orso.Arpa.Domain/ProjectDomain/Model/Project.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Orso.Arpa.Domain.ProjectDomain.Model
{
public class Project : BaseEntity
{
public Project(Guid? id, CreateProject.Command command) : base(id)
public Project(Guid id, CreateProject.Command command) : base(id)
{
Title = command.Title;
ShortTitle = command.ShortTitle;
Expand Down
4 changes: 2 additions & 2 deletions Orso.Arpa.Domain/ProjectDomain/Model/ProjectAppointment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ namespace Orso.Arpa.Domain.ProjectDomain.Model
{
public class ProjectAppointment : BaseEntity
{
public ProjectAppointment(Guid? id, Project project, Appointment appointment) : base(id)
public ProjectAppointment(Guid? id, Project project, Appointment appointment) : base(id ?? Guid.NewGuid())
{
Project = project;
Appointment = appointment;
}

public ProjectAppointment(Guid? id, Guid projectId, Guid appointmentId) : base(id)
public ProjectAppointment(Guid id, Guid projectId, Guid appointmentId) : base(id)
{
ProjectId = projectId;
AppointmentId = appointmentId;
Expand Down
6 changes: 3 additions & 3 deletions Orso.Arpa.Domain/ProjectDomain/Model/ProjectParticipation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Orso.Arpa.Domain.ProjectDomain.Model
{
public class ProjectParticipation : BaseEntity
{
public ProjectParticipation(SetProjectParticipation.Command command, Guid? id = null) : base(id)
public ProjectParticipation(SetProjectParticipation.Command command, Guid? id = null) : base(id ?? Guid.NewGuid())
{
ProjectId = command.ProjectId;
MusicianProfileId = command.MusicianProfileId;
Expand All @@ -20,7 +20,7 @@ public ProjectParticipation(SetProjectParticipation.Command command, Guid? id =
ParticipationStatusInternal = command.ParticipationStatusInternal;
}

public ProjectParticipation(SetMyProjectParticipationStatus.Command command, Guid? id = null) : base(id)
public ProjectParticipation(SetMyProjectParticipationStatus.Command command, Guid? id = null) : base(id ?? Guid.NewGuid())
{
ProjectId = command.ProjectId;
MusicianProfileId = command.MusicianProfileId;
Expand Down Expand Up @@ -84,7 +84,7 @@ public ProjectParticipationStatusResult ParticipationStatusResult
}
}

private bool HasAtLeastOneRefusalStatus =>
private bool HasAtLeastOneRefusalStatus =>
ProjectParticipationStatusInner.Refusal.Equals(ParticipationStatusInner)
|| ProjectParticipationStatusInner.RehearsalsOnly.Equals(ParticipationStatusInner)
|| ProjectParticipationStatusInternal.Refusal.Equals(ParticipationStatusInternal);
Expand Down
4 changes: 2 additions & 2 deletions Orso.Arpa.Domain/ProjectDomain/Model/Url.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ namespace Orso.Arpa.Domain.ProjectDomain.Model
{
public class Url : BaseEntity
{
public Url(Guid? id, CreateUrl.Command command) : base(id)
public Url(Guid id, CreateUrl.Command command) : base(id)
{
Href = command.Href;
AnchorText = command.AnchorText;
ProjectId = command.ProjectId;
}

internal Url(Guid? id) : base(id)
internal Url(Guid id) : base(id)
{
}

Expand Down
2 changes: 1 addition & 1 deletion Orso.Arpa.Domain/ProjectDomain/Model/UrlRole.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Orso.Arpa.Domain.ProjectDomain.Model
{
public class UrlRole : BaseEntity
{
public UrlRole(Guid? id, Url url, Role role) : base(id)
public UrlRole(Guid? id, Url url, Role role) : base(id ?? Guid.NewGuid())
{
Url = url;
Role = role;
Expand Down
2 changes: 1 addition & 1 deletion Orso.Arpa.Domain/RegionDomain/Model/Region.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Orso.Arpa.Domain.RegionDomain.Model
{
public class Region : BaseEntity
{
public Region(Guid? id, CreateRegion.Command command) : base(id)
public Region(Guid id, CreateRegion.Command command) : base(id)
{
Name = command.Name;
IsForPerformance = command.IsForPerformance;
Expand Down
2 changes: 1 addition & 1 deletion Orso.Arpa.Domain/RegionDomain/Model/RegionPreference.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Orso.Arpa.Domain.RegionDomain.Model
{
public class RegionPreference : BaseEntity
{
public RegionPreference(Guid? id, CreateMyRegionPreference.Command command) : base(id)
public RegionPreference(Guid id, CreateMyRegionPreference.Command command) : base(id)
{
RegionId = command.RegionId;
MusicianProfileId = command.MusicianProfileId;
Expand Down
Loading
Loading