Skip to content

Commit e67d044

Browse files
committed
Refactored a bit.
1 parent 3c6ec96 commit e67d044

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

SimpleTaskSystem/SimpleTaskSystem.Application/Tasks/Dtos/CreateTaskInput.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,10 @@ public class CreateTaskInput : IInputDto
99

1010
[Required]
1111
public string Description { get; set; }
12+
13+
public override string ToString()
14+
{
15+
return string.Format("[CreateTaskInput > AssignedPersonId = {0}, Description = {1}]", AssignedPersonId, Description);
16+
}
1217
}
1318
}

SimpleTaskSystem/SimpleTaskSystem.Application/Tasks/Dtos/UpdateTaskInput.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public void AddValidationErrors(List<ValidationResult> results)
3131

3232
public override string ToString()
3333
{
34-
return string.Format("[UpdateTask > TaskId = {0}, AssignedPersonId = {1}, State = {2}]", TaskId, AssignedPersonId, State);
34+
return string.Format("[UpdateTaskInput > TaskId = {0}, AssignedPersonId = {1}, State = {2}]", TaskId, AssignedPersonId, State);
3535
}
3636
}
3737
}

SimpleTaskSystem/SimpleTaskSystem.Application/Tasks/TaskAppService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public void UpdateTask(UpdateTaskInput input)
5050
//Retrieving a task entity with given id using standard Get method of repositories.
5151
var task = _taskRepository.Get(input.TaskId);
5252

53-
//Updating changed peoperties of the retrieved task entity.
53+
//Updating changed properties of the retrieved task entity.
5454

5555
if (input.State.HasValue)
5656
{
@@ -70,7 +70,7 @@ public void UpdateTask(UpdateTaskInput input)
7070
public void CreateTask(CreateTaskInput input)
7171
{
7272
//We can use Logger, it's defined in ApplicationService class.
73-
Logger.Info("Creating a new task with description: " + input.Description);
73+
Logger.Info("Creating a task for input: " + input);
7474

7575
//Creating a new Task entity with given input's properties
7676
var task = new Task { Description = input.Description };

SimpleTaskSystem/SimpleTaskSystem.Core/People/Person.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public class Person : Entity
1111
{
1212
/// <summary>
1313
/// A property (database field) for a Person to store his/her name.
14-
/// NOTE: NHibernate requires that all members of an entity must be virtual (for proxying)!
14+
/// NOTE: NHibernate requires that all members of an entity must be virtual (for proxying purposes)!
1515
/// </summary>
1616
public virtual string Name { get; set; }
1717
}

0 commit comments

Comments
 (0)