File tree 13 files changed +44
-83
lines changed
Course.Persistence/Constant
StudentCourse.Application
StudentCourse.Persistence/Constant 13 files changed +44
-83
lines changed Original file line number Diff line number Diff line change 4
4
},
5
5
"AppSettings" : {
6
6
"LongRunningProcessMilliseconds" : " 1500" ,
7
- "MSG_USER_NULLUSERID" : " User ID is required!" ,
8
- "MSG_USER_NULLFIRSTNAME" : " First Name is required!" ,
9
- "MSG_USER_NULLLASTNAME" : " Last Name is required!" ,
10
- "MSG_USER_NULLDOB" : " Date of birth is required!" ,
11
- "MSG_USER_NULLGENDER" : " Gender is required!" ,
12
- "MSG_USER_GENDER_LEN" : " Gender can be only M/F!" ,
13
- "MSG_USER_NULLEMAILADDR" : " Email Address is required!" ,
14
- "MSG_USER_NULLPHNUM" : " Phone Number is required!" ,
15
- "MSG_USER_NULLCITY" : " City is required!" ,
16
- "MSG_USER_NULLSTATE" : " State is required!" ,
17
- "MSG_USER_NULLCOUNTRY" : " Country is required!"
7
+ "MSG_COURSE_COURSENAME" : " Course Name is required!" ,
8
+ "MSG_COURSE_NULLCREDITHOUR" : " Credit Hour is required!" ,
9
+ "MSG_COURSE_COURSEID" : " Course ID is required!"
18
10
},
19
11
"Logging" : {
20
12
"LogLevel" : {
Original file line number Diff line number Diff line change @@ -5,16 +5,8 @@ public interface IConfigConstants
5
5
string CourseConnection { get ; }
6
6
string TestFullStackConnection { get ; }
7
7
int LongRunningProcessMilliseconds { get ; }
8
- string MSG_USER_NULLUSERID { get ; }
9
- string MSG_USER_NULLFIRSTNAME { get ; }
10
- string MSG_USER_NULLLASTNAME { get ; }
11
- string MSG_USER_NULLDOB { get ; }
12
- string MSG_USER_NULLGENDER { get ; }
13
- string MSG_USER_GENDER_LEN { get ; }
14
- string MSG_USER_NULLEMAILADDR { get ; }
15
- string MSG_USER_NULLPHNUM { get ; }
16
- string MSG_USER_NULLCITY { get ; }
17
- string MSG_USER_NULLSTATE { get ; }
18
- string MSG_USER_NULLCOUNTRY { get ; }
8
+ string MSG_COURSE_COURSENAME { get ; }
9
+ string MSG_COURSE_NULLCREDITHOUR { get ; }
10
+ string MSG_COURSE_COURSEID { get ; }
19
11
}
20
12
}
Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ public class AddCourseCommandValidator : AbstractValidator<AddCourseCommand>
7
7
{
8
8
public AddCourseCommandValidator ( IConfigConstants constant )
9
9
{
10
- this . RuleFor ( v => v . CourseName ) . NotEmpty ( ) . WithMessage ( constant . MSG_USER_NULLFIRSTNAME ) ;
11
- this . RuleFor ( v => v . CreditHour ) . GreaterThan ( 0 ) . WithMessage ( constant . MSG_USER_NULLLASTNAME ) ;
10
+ this . RuleFor ( v => v . CourseName ) . NotEmpty ( ) . WithMessage ( constant . MSG_COURSE_COURSENAME ) ;
11
+ this . RuleFor ( v => v . CreditHour ) . GreaterThan ( 0 ) . WithMessage ( constant . MSG_COURSE_NULLCREDITHOUR ) ;
12
12
}
13
13
}
14
- }
14
+ }
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ public class DeleteCourseCommandValidator : AbstractValidator<DeleteCourseComman
6
6
{
7
7
public DeleteCourseCommandValidator ( IConfigConstants constant )
8
8
{
9
- this . RuleFor ( v => v . CourseID ) . GreaterThan ( 0 ) . WithMessage ( constant . MSG_USER_NULLUSERID ) ;
9
+ this . RuleFor ( v => v . CourseID ) . GreaterThan ( 0 ) . WithMessage ( constant . MSG_COURSE_COURSEID ) ;
10
10
}
11
11
}
12
- }
12
+ }
Original file line number Diff line number Diff line change @@ -6,8 +6,8 @@ public class UpdateCourseCommandValidator : AbstractValidator<UpdateCourseComman
6
6
{
7
7
public UpdateCourseCommandValidator ( IConfigConstants constant )
8
8
{
9
- this . RuleFor ( v => v . CourseName ) . NotEmpty ( ) . WithMessage ( constant . MSG_USER_NULLFIRSTNAME ) ;
10
- this . RuleFor ( v => v . CreditHour ) . GreaterThan ( 0 ) . WithMessage ( constant . MSG_USER_NULLLASTNAME ) ;
9
+ this . RuleFor ( v => v . CourseName ) . NotEmpty ( ) . WithMessage ( constant . MSG_COURSE_COURSENAME ) ;
10
+ this . RuleFor ( v => v . CreditHour ) . GreaterThan ( 0 ) . WithMessage ( constant . MSG_COURSE_NULLCREDITHOUR ) ;
11
11
}
12
12
}
13
- }
13
+ }
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ public class GetSingleCourseQueryValidator : AbstractValidator<GetSingleCourseQu
6
6
{
7
7
public GetSingleCourseQueryValidator ( IConfigConstants constant )
8
8
{
9
- this . RuleFor ( v => v . CourseID ) . GreaterThan ( 0 ) . WithMessage ( constant . MSG_USER_NULLUSERID ) ;
9
+ this . RuleFor ( v => v . CourseID ) . GreaterThan ( 0 ) . WithMessage ( constant . MSG_COURSE_COURSEID ) ;
10
10
}
11
11
}
12
- }
12
+ }
Original file line number Diff line number Diff line change @@ -14,16 +14,11 @@ public ConfigConstants(IConfiguration configuration)
14
14
public string TestFullStackConnection => this . Configuration . GetConnectionString ( "TestFullStackConnection" ) ;
15
15
public int LongRunningProcessMilliseconds => int . Parse ( this . Configuration [ "AppSettings:LongRunningProcessMilliseconds" ] ) ;
16
16
17
- public string MSG_USER_NULLUSERID => this . Configuration [ "AppSettings:MSG_USER_NULLUSERID" ] ;
18
- public string MSG_USER_NULLFIRSTNAME => this . Configuration [ "AppSettings:MSG_USER_NULLFIRSTNAME" ] ;
19
- public string MSG_USER_NULLLASTNAME => this . Configuration [ "AppSettings:MSG_USER_NULLLASTNAME" ] ;
20
- public string MSG_USER_NULLDOB => this . Configuration [ "AppSettings:MSG_USER_NULLDOB" ] ;
21
- public string MSG_USER_NULLGENDER => this . Configuration [ "AppSettings:MSG_USER_NULLGENDER" ] ;
22
- public string MSG_USER_GENDER_LEN => this . Configuration [ "AppSettings:MSG_USER_GENDER_LEN" ] ;
23
- public string MSG_USER_NULLEMAILADDR => this . Configuration [ "AppSettings:MSG_USER_NULLEMAILADDR" ] ;
24
- public string MSG_USER_NULLPHNUM => this . Configuration [ "AppSettings:MSG_USER_NULLPHNUM" ] ;
25
- public string MSG_USER_NULLCITY => this . Configuration [ "AppSettings:MSG_USER_NULLCITY" ] ;
26
- public string MSG_USER_NULLSTATE => this . Configuration [ "AppSettings:MSG_USER_NULLSTATE" ] ;
27
- public string MSG_USER_NULLCOUNTRY => this . Configuration [ "AppSettings:MSG_USER_NULLCOUNTRY" ] ;
17
+ public string MSG_COURSE_COURSENAME => this . Configuration [ "AppSettings:MSG_COURSE_COURSENAME" ] ;
18
+
19
+ public string MSG_COURSE_NULLCREDITHOUR => this . Configuration [ "AppSettings:MSG_COURSE_NULLCREDITHOUR" ] ;
20
+
21
+ public string MSG_COURSE_COURSEID => this . Configuration [ "AppSettings:MSG_COURSE_COURSEID" ] ;
22
+
28
23
}
29
24
}
Original file line number Diff line number Diff line change 4
4
},
5
5
"AppSettings" : {
6
6
"LongRunningProcessMilliseconds" : " 1500" ,
7
- "MSG_USER_NULLUSERID" : " User ID is required!" ,
8
- "MSG_USER_NULLFIRSTNAME" : " First Name is required!" ,
9
- "MSG_USER_NULLLASTNAME" : " Last Name is required!" ,
10
- "MSG_USER_NULLDOB" : " Date of birth is required!" ,
11
- "MSG_USER_NULLGENDER" : " Gender is required!" ,
12
- "MSG_USER_GENDER_LEN" : " Gender can be only M/F!" ,
13
- "MSG_USER_NULLEMAILADDR" : " Email Address is required!" ,
14
- "MSG_USER_NULLPHNUM" : " Phone Number is required!" ,
15
- "MSG_USER_NULLCITY" : " City is required!" ,
16
- "MSG_USER_NULLSTATE" : " State is required!" ,
17
- "MSG_USER_NULLCOUNTRY" : " Country is required!"
7
+ "MSG_COURSE_COURSENAME" : " Course Name is required!" ,
8
+ "MSG_COURSE_NULLCREDITHOUR" : " Credit Hour is required!" ,
9
+ "MSG_COURSE_COURSEID" : " Course ID is required!"
18
10
},
19
11
"Logging" : {
20
12
"LogLevel" : {
Original file line number Diff line number Diff line change @@ -5,16 +5,10 @@ public interface IConfigConstants
5
5
string StudentCourseConnection { get ; }
6
6
string TestFullStackConnection { get ; }
7
7
int LongRunningProcessMilliseconds { get ; }
8
- string MSG_USER_NULLUSERID { get ; }
9
- string MSG_USER_NULLFIRSTNAME { get ; }
10
- string MSG_USER_NULLLASTNAME { get ; }
11
- string MSG_USER_NULLDOB { get ; }
12
- string MSG_USER_NULLGENDER { get ; }
13
- string MSG_USER_GENDER_LEN { get ; }
14
- string MSG_USER_NULLEMAILADDR { get ; }
15
- string MSG_USER_NULLPHNUM { get ; }
16
- string MSG_USER_NULLCITY { get ; }
17
- string MSG_USER_NULLSTATE { get ; }
18
- string MSG_USER_NULLCOUNTRY { get ; }
8
+ string MSG_COURSE_COURSENAME { get ; }
9
+ string MSG_COURSE_NULLCREDITHOUR { get ; }
10
+ string MSG_COURSE_COURSEID { get ; }
11
+
12
+ string MSG_SC_NULLStdCourseID { get ; }
19
13
}
20
14
}
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ public class DeleteStudentCourseCommandValidator : AbstractValidator<DeleteStude
7
7
{
8
8
public DeleteStudentCourseCommandValidator ( IConfigConstants constant )
9
9
{
10
- this . RuleFor ( v => v . StudentCourseID ) . GreaterThan ( 0 ) . WithMessage ( constant . MSG_USER_NULLUSERID ) ;
10
+ this . RuleFor ( v => v . StudentCourseID ) . GreaterThan ( 0 ) . WithMessage ( constant . MSG_SC_NULLStdCourseID ) ;
11
11
}
12
12
}
13
- }
13
+ }
Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ public class UpdateStudentCourseCommandValidator : AbstractValidator<UpdateStude
7
7
{
8
8
public UpdateStudentCourseCommandValidator ( IConfigConstants constant )
9
9
{
10
- this . RuleFor ( v => v . CourseName ) . NotEmpty ( ) . WithMessage ( constant . MSG_USER_NULLFIRSTNAME ) ;
11
- this . RuleFor ( v => v . CreditHour ) . GreaterThan ( 0 ) . WithMessage ( constant . MSG_USER_NULLLASTNAME ) ;
10
+ this . RuleFor ( v => v . CourseName ) . NotEmpty ( ) . WithMessage ( constant . MSG_COURSE_COURSENAME ) ;
11
+ this . RuleFor ( v => v . CreditHour ) . GreaterThan ( 0 ) . WithMessage ( constant . MSG_COURSE_NULLCREDITHOUR ) ;
12
12
}
13
13
}
14
- }
14
+ }
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ public class GetSingleStudentCourseQueryValidator : AbstractValidator<GetSingleS
7
7
{
8
8
public GetSingleStudentCourseQueryValidator ( IConfigConstants constant )
9
9
{
10
- this . RuleFor ( v => v . CourseID ) . GreaterThan ( 0 ) . WithMessage ( constant . MSG_USER_NULLUSERID ) ;
10
+ this . RuleFor ( v => v . CourseID ) . GreaterThan ( 0 ) . WithMessage ( constant . MSG_COURSE_COURSEID ) ;
11
11
}
12
12
}
13
- }
13
+ }
Original file line number Diff line number Diff line change @@ -15,16 +15,12 @@ public ConfigConstants(IConfiguration configuration)
15
15
public string TestFullStackConnection => this . Configuration . GetConnectionString ( "TestFullStackConnection" ) ;
16
16
public int LongRunningProcessMilliseconds => int . Parse ( this . Configuration [ "AppSettings:LongRunningProcessMilliseconds" ] ) ;
17
17
18
- public string MSG_USER_NULLUSERID => this . Configuration [ "AppSettings:MSG_USER_NULLUSERID" ] ;
19
- public string MSG_USER_NULLFIRSTNAME => this . Configuration [ "AppSettings:MSG_USER_NULLFIRSTNAME" ] ;
20
- public string MSG_USER_NULLLASTNAME => this . Configuration [ "AppSettings:MSG_USER_NULLLASTNAME" ] ;
21
- public string MSG_USER_NULLDOB => this . Configuration [ "AppSettings:MSG_USER_NULLDOB" ] ;
22
- public string MSG_USER_NULLGENDER => this . Configuration [ "AppSettings:MSG_USER_NULLGENDER" ] ;
23
- public string MSG_USER_GENDER_LEN => this . Configuration [ "AppSettings:MSG_USER_GENDER_LEN" ] ;
24
- public string MSG_USER_NULLEMAILADDR => this . Configuration [ "AppSettings:MSG_USER_NULLEMAILADDR" ] ;
25
- public string MSG_USER_NULLPHNUM => this . Configuration [ "AppSettings:MSG_USER_NULLPHNUM" ] ;
26
- public string MSG_USER_NULLCITY => this . Configuration [ "AppSettings:MSG_USER_NULLCITY" ] ;
27
- public string MSG_USER_NULLSTATE => this . Configuration [ "AppSettings:MSG_USER_NULLSTATE" ] ;
28
- public string MSG_USER_NULLCOUNTRY => this . Configuration [ "AppSettings:MSG_USER_NULLCOUNTRY" ] ;
18
+ public string MSG_COURSE_COURSENAME => this . Configuration [ "AppSettings:MSG_COURSE_COURSENAME" ] ;
19
+
20
+ public string MSG_COURSE_NULLCREDITHOUR => this . Configuration [ "AppSettings:MSG_COURSE_NULLCREDITHOUR" ] ;
21
+
22
+ public string MSG_COURSE_COURSEID => this . Configuration [ "AppSettings:MSG_COURSE_COURSEID" ] ;
23
+
24
+ public string MSG_SC_NULLStdCourseID => this . Configuration [ "AppSettings:MSG_SC_NULLStdCourseID" ] ;
29
25
}
30
26
}
You can’t perform that action at this time.
0 commit comments