Clone this repository and bring the code pieces you need into your BDSA Assignments GitHub repository.
You are required to implement a model using Entity Framework Core for a simple kanban board for tracking work progress.
-
Install the required
Microsoft.EntityFrameworkCore
package. -
Setup and configure your database host of choice.
-
Implement the following entities (POCOs) in the
Entities
project.- Task
- Id : int
- Title : string(100), required
- AssignedTo : optional reference to User entity
- Description : string(max), optional
- State : enum (New, Active, Resolved, Closed, Removed), required
- Tags : many-to-many reference to Tag entity
- User
- Id : int
- Name : string(100), required
- Email : string(100), required, unique
- Tasks : list of Task entities belonging to User
- Tag
- Id : int
- Name : string(50), required, unique
- Tasks : many-to-many reference to Task entity
- Task
-
Ensure that the
State
property of theTask
entity is stored as astring
. See: https://docs.microsoft.com/en-us/ef/core/modeling/value-conversions. -
Implement the
KanbanContext
required for the model above in theEntities
project. -
Implement and test the
ITaskRepository
interface in theCore
project using theTaskRepository
class in theEntities
project.
To test your repository you may want to generate some test data.
Consider seeding or custom initialization logic, cf. https://docs.microsoft.com/en-us/ef/core/modeling/data-seeding and https://mockaroo.com/.
You may want to ensure that your tests are run in a specific order: https://docs.microsoft.com/en-us/dotnet/core/testing/order-unit-tests?pivots=xunit.
Study the meaning of encapsulation, inheritance, and polymorphism in OO languages. Provide a description of these concepts including UML diagram showcasing them.
As a maintainance activity (i.e., after having written the code): draw a class diagram representing your implementation of the entities for the C# part. The purpose of the diagram should be to document
the main relationships between the entities and their multiplicity.
As a maintainance activity (i.e., after having written the code): draw a state machine diagram representing your implementation of the task entity. The purpose of the diagram should be to document
the diffent states the entity can go through and the transitions that trigget the changes.
For each of the SOLID principles, provide an example through either a UML diagram or a code listing that showcases the violation of the specific principle. Note: the examples do not need to be sophisticated.
For each of the examples provided for SE-4, provide a refactored solution as either a UML diagram or a code listing that showcases a possible solution respecting the principle violeted. Note: the examples do not need to be sophisticated.
Exercises 4 and 5 could be used in class to further discuss additional examples of the SOLID principles. If you wish to present and discuss your examples discussed in class, I would be happy to include an hour in one of the future lectures. Therefore, if the above sounds interesting, please do not hesitate to contact me. The idea would be to have a brief slot in which you would present your example of one or more of the SOLID principles.
To submit the assignment you need to create a .pdf document using LaTeX containing the answers to the SE questions and a link to a public repository containing your fork of the completed code with the solutions to the C# part.
Members of the triplets should submit the same PDF file to pass the assignments. Make sure all group names and ID are clearly marked on the front page.