OukiShogun
Field required but I don't mention "required" above
Hello there,
I have a problem. My field is considered as required by .net but I don't created it as required.
Below my controller
And the response
{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"traceId": "00-5588746f27392f4367a0d759b70b8f78-20699cede6741c50-00",
"errors": {
"JobGroupName": [
"The JobGroupName field is required."
]
}
}
I don't understand why. Can someone help me please5 replies
❔ Which database for integration test using db transactions
Hi there,
I am coding my integration test project.
And I want to test the transactionnal aspect of two functions called.
I installed sqllite inmemory on my project. And set it in memory
I well mocked my the last function called before the commit and do a
.throw(new Exception());
and context.rollbackTransaction()
in the catch.
But I get a "no such table : Buy" when I run my test. I don't understand why I will have to do migration on a inmemory database. For me, it's a no-sense.
So, what do you advise me to use for my test ? in prod I use sql server13 replies
❔ What is the question to ask for placing a class inside Core ou Infrastructure project
I sometimes hear that infrastructure project must contains only class who communicate with external services. (Database, Redis, SQL Server).
Other times that Core must contains only interface.
How to decide ? For exemple, I have a handmade mediator class. Where must I place it ?
2 replies