SSWConsulting / SSWConsulting/SSW.Rules.GPT

♻️ Extract EF config from RulesContext

Open
#151 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Type: Refactor
Dominant language
C#
Stars
24
Forks
7
PR merge metrics
No merged PRs in 30d

Description

Cc: @danielmackay

Hi

Pain

Currently all of the EF config is stored in the DbContext.
Dan suggested it should be moved out into a seperate class to keep the DbContext tidy as part of his review on #150.
The names of model classes should also have consistent suffixes, i.e. Model, Result or no suffix

Acceptance Criteria

The EF configuration code is extracted from RulesContext and the database access still works as expected.

Thanks!

### Tasks
- [ ] Extract EF config to a seperate class
- [ ] Make names of model classes consistent (i.e suffixes Model, Result)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate RulesContext and read the EF configuration currently contained there, then identify the model classes whose suffixes need to be made consistent. Extract that configuration into a separate class while preserving database access, and verify the existing database behavior using the repository's available checks.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
databases
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.