Zee
Zee
Explore posts from servers
Mmfad
Created by Clark'sDesertBot on 4/11/2025 in #topic-of-the-day
Zippers vs Buttons - Topic of the day 4/11/25
zipper for jeans and trousers
36 replies
Mmfad
Created by Clark'sDesertBot on 4/10/2025 in #topic-of-the-day
Graphic Pants - Topic of the day 4/10/25
im not really a fan of anime but those jeans look really nice
28 replies
CC#
Created by Zee on 4/6/2025 in #help
✅ what to do when I want ref my ID but the class does not have access to the database
ok this makes sense so it also hides the db for security reasons so they cant do anything to it just the stuff in the view model?
35 replies
CC#
Created by Zee on 4/6/2025 in #help
✅ what to do when I want ref my ID but the class does not have access to the database
ah ok that helps me understand thx
35 replies
CC#
Created by Zee on 4/6/2025 in #help
✅ what to do when I want ref my ID but the class does not have access to the database
what do I gain from mapping to a view model why do that? is it so the cshtml cant access the databaase?
35 replies
CC#
Created by Zee on 4/6/2025 in #help
✅ what to do when I want ref my ID but the class does not have access to the database
ok so your saying that its only for when adding a databaase through dbContext. but why is this any scenario where a viewmodel is better?
35 replies
CC#
Created by Zee on 4/6/2025 in #help
✅ what to do when I want ref my ID but the class does not have access to the database
just scrap the viewmodel as a whole and replace it with my model which has the id and a link to the databasae
35 replies
CC#
Created by Zee on 4/6/2025 in #help
✅ what to do when I want ref my ID but the class does not have access to the database
why cant I just scrap the viewmodel and ref the model directly?
35 replies
CC#
Created by Zee on 4/6/2025 in #help
✅ what to do when I want ref my ID but the class does not have access to the database
I could just scrap the views model and use the model itself in my views and controller ?
35 replies
CC#
Created by Zee on 4/6/2025 in #help
✅ what to do when I want ref my ID but the class does not have access to the database
fair enough I was thinkinng that too but I saw online that the viewModel shouldnt have the ID because it doesnt do anything with the database. I think the problem i am having is the project is quite small so I am not getting the most out of these code flows like whats the point of having a view model if its just a copy and past of my view?
35 replies
CC#
Created by Zee on 4/6/2025 in #help
✅ what to do when I want ref my ID but the class does not have access to the database
public async Task<FeedBackFormViewModel> DeleteFromForm(int formId)
{
await _repository.DeleteAsync(formId);
return null;
}
public async Task<FeedBackFormViewModel> DeleteFromForm(int formId)
{
await _repository.DeleteAsync(formId);
return null;
}
public async Task<IActionResult> Index()
{
var forms = await _feedbackFormService.ReadForms();
return View(forms);
}
public async Task<IActionResult> Index()
{
var forms = await _feedbackFormService.ReadForms();
return View(forms);
}
35 replies
CC#
Created by Zee on 4/6/2025 in #help
✅ code cant find reference to my ID but I am implementing it correctly
hmm thx I think I will start this again
229 replies
CC#
Created by Zee on 4/6/2025 in #help
✅ code cant find reference to my ID but I am implementing it correctly
or move the code to the controller
229 replies
CC#
Created by Zee on 4/6/2025 in #help
✅ code cant find reference to my ID but I am implementing it correctly
so I have to make one
229 replies
CC#
Created by Zee on 4/6/2025 in #help
✅ code cant find reference to my ID but I am implementing it correctly
right I get u
229 replies
CC#
Created by Zee on 4/6/2025 in #help
✅ code cant find reference to my ID but I am implementing it correctly
I think its 3 cos I followed everthing before and it worked
229 replies
CC#
Created by Zee on 4/6/2025 in #help
✅ code cant find reference to my ID but I am implementing it correctly
so thecontroller.User means the JobPosting.User? his controller name is JobPosting
229 replies
CC#
Created by Zee on 4/6/2025 in #help
✅ code cant find reference to my ID but I am implementing it correctly
cos hes in the controller
229 replies
CC#
Created by Zee on 4/6/2025 in #help
✅ code cant find reference to my ID but I am implementing it correctly
yh it does work
229 replies
CC#
Created by Zee on 4/6/2025 in #help
✅ code cant find reference to my ID but I am implementing it correctly
nope this is my intro to it
229 replies