diff --git a/.gitignore b/.gitignore index ca1c7a3..7f76508 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,11 @@ # User-specific files (MonoDevelop/Xamarin Studio) *.userprefs +# dll файлы +*.dll + +/MotorPlant/ImplementationExtensions + # Mono auto generated files mono_crash.* diff --git a/MotorPlant/MotorPlantBusinessLogic/BusinessLogic/ClientLogic.cs b/MotorPlant/MotorPlantBusinessLogic/BusinessLogic/ClientLogic.cs index 6f7f230..c2b5895 100644 --- a/MotorPlant/MotorPlantBusinessLogic/BusinessLogic/ClientLogic.cs +++ b/MotorPlant/MotorPlantBusinessLogic/BusinessLogic/ClientLogic.cs @@ -97,7 +97,7 @@ namespace MotorPlantBusinessLogic.BusinessLogics { throw new ArgumentNullException("Не указана валидная почта", nameof(model.Email)); } - if (string.IsNullOrEmpty(model.Password)) + if (string.IsNullOrEmpty(model.Password) || !Regex.IsMatch(model.Password, @"^(?=.*[A-Za-z])(?=.*\d)(?=.*[^A-Za-z0-9\n]).{10,50}$")) { throw new ArgumentNullException("Не указан правильный пароль", nameof(model.Password)); } diff --git a/MotorPlant/MotorPlantDatabaseImplement/Models/MessageInfo.cs b/MotorPlant/MotorPlantDatabaseImplement/Models/MessageInfo.cs index 5a6ecd4..744f24f 100644 --- a/MotorPlant/MotorPlantDatabaseImplement/Models/MessageInfo.cs +++ b/MotorPlant/MotorPlantDatabaseImplement/Models/MessageInfo.cs @@ -8,9 +8,10 @@ namespace MotorPlantDatabaseImplement.Models { public class MessageInfo : IMessageInfoModel { - [Key] - [DatabaseGenerated(DatabaseGeneratedOption.None)] - public string MessageId { get; set; } = string.Empty; + + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + public string MessageId { get; set; } = string.Empty; public int? ClientId { get; set; } diff --git a/MotorPlant/MotorPlantDatabaseImplement/MotorPlantDatabase.cs b/MotorPlant/MotorPlantDatabaseImplement/MotorPlantDatabase.cs index 47139cf..a4df040 100644 --- a/MotorPlant/MotorPlantDatabaseImplement/MotorPlantDatabase.cs +++ b/MotorPlant/MotorPlantDatabaseImplement/MotorPlantDatabase.cs @@ -21,6 +21,6 @@ namespace MotorPlantDatabaseImplement public virtual DbSet Orders { get; set; } public virtual DbSet Clients { set; get; } public virtual DbSet Implementers { set; get; } - public virtual DbSet MessageInfo { set; get; } - } + public virtual DbSet MessageInfo { set; get; } + } } \ No newline at end of file