This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TaskToDo : IdentityEntity | |
{ | |
public string Title { get; set; } | |
public DateTime Start { get; set; } | |
public DateTime DeadLine { get; set; } | |
public bool Status { get; set; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class IdentityEntity | |
{ | |
[Key] | |
public int Id { get; set; } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Developer : IdentityEntity | |
{ | |
public string Name { get; set; } | |
public DevType DevType { get; set; } | |
private ICollection<TaskToDo> _tasksToDo { get; set; } | |
public virtual IReadOnlyCollection<TaskToDo> TasksToDo { get { return _tasksToDo as Collection<TaskToDo>; } } | |
public Developer() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public enum DevType | |
{ | |
FrontEnd = 1, | |
BackEnd = 2, | |
Fullstack = 3 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class User | |
{ | |
public string Name { get; set; } | |
public UserTypes Type { get; set; } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@model Domain.Entities.TaskToDo | |
@{ | |
ViewData["Title"] = "Create"; | |
Layout = "~/Views/Shared/_Layout.cshtml"; | |
} | |
<h2>Create</h2> | |
<h4>TaskToDo</h4> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TaskToDoController : Controller | |
{ | |
private readonly ITaskToDoService _taskToDoService; | |
public TaskToDoController(ITaskToDoService taskToDoService) | |
{ | |
_taskToDoService = taskToDoService; | |
} | |
// GET: TaskToDo/Create/{userId} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Infrastructure.DBConfiguration | |
{ | |
public class DatabaseConnection | |
{ | |
public static IConfiguration ConnectionConfiguration | |
{ | |
get | |
{ | |
var path = $"{Directory.GetParent(Directory.GetCurrentDirectory()).ToString()}\\Infrastructure"; | |
IConfigurationRoot Configuration = new ConfigurationBuilder() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@model IndexPageViewModel | |
@{ | |
ViewData["Title"] = "Index"; | |
Layout = "~/Views/Shared/_Layout.cshtml"; | |
} | |
<h2>Index</h2> | |
<p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class UserController : Controller | |
{ | |
... | |
// GET: User | |
public async Task<IActionResult> Index(int? id) | |
{ | |
var result = await _userService.GetAllIncludingTasksAsync(); | |
var viewModel = new IndexPageViewModel(); | |
return View(viewModel.MapUsersToViewModel(id, result)); |