Zee
Zee
Explore posts from servers
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
so I am learnign MVC and I my code set up is like this repositiroy - talks to database service class - talks to repos but maps everything to a view model controller talks to my service class I want to delete somethign on my index.cshtml but it uses my ViewModels not my Model class. so yeah any suggestions? I could delete by name but wonder if there are any other work arounds what do most ppl do in this case
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
Severity Code Description Project File Line Suppression State Details Error CS0103 The name 'customers' does not exist in the current context PharmacyApp D:\Zeeshan\Documents\Pharmacy\PharmacyApp\Services\FeedbackFormService.cs 27 Active
using Microsoft.AspNetCore.Identity;
using PharmacyApp.Models;
using PharmacyApp.Repositories;
using PharmacyApp.ViewModels;

namespace PharmacyApp.Services
{
public class FeedbackFormService : IFeedbackFormService<FeedBackFormViewModel>
{
private readonly IRepository<FeedbackForm> _repository;
private readonly UserManager<IdentityUser> _userManager;


public FeedbackFormService(IRepository<FeedbackForm> repository, UserManager<IdentityUser> userManager)
{
_repository = repository;
_userManager = userManager;
}

public async Task<FeedBackFormViewModel> CreateForm(FeedBackFormViewModel entity)
{

var model = new FeedbackForm
{
Title = entity.Title,
Description = entity.Description,
CustomerID = _userManager.GetUserId(customers)
};

// Add to repository
await _repository.AddAsync(model);

return entity;

}
}
}
using Microsoft.AspNetCore.Identity;
using PharmacyApp.Models;
using PharmacyApp.Repositories;
using PharmacyApp.ViewModels;

namespace PharmacyApp.Services
{
public class FeedbackFormService : IFeedbackFormService<FeedBackFormViewModel>
{
private readonly IRepository<FeedbackForm> _repository;
private readonly UserManager<IdentityUser> _userManager;


public FeedbackFormService(IRepository<FeedbackForm> repository, UserManager<IdentityUser> userManager)
{
_repository = repository;
_userManager = userManager;
}

public async Task<FeedBackFormViewModel> CreateForm(FeedBackFormViewModel entity)
{

var model = new FeedbackForm
{
Title = entity.Title,
Description = entity.Description,
CustomerID = _userManager.GetUserId(customers)
};

// Add to repository
await _repository.AddAsync(model);

return entity;

}
}
}
there error is on this line
userID = _userManager.GetUserId(customers)
userID = _userManager.GetUserId(customers)
I checked my DI in program.cs its all right to me
229 replies
CC#
Created by Zee on 4/5/2025 in #help
can you call a function in a partial_view?
so I am makign this pharmaceutical mvc app and I for some reason when I do a view Page source it says It cant find my script. so am i allowed to run a script in a partial view I would assume so since its only a naming convention
15 replies
CC#
Created by Zee on 2/9/2025 in #help
Binding a class to a button
so I am trying to make it so when the user clicks the view details button a message box pop ups showing extra details but I am getting this error System.ArgumentException: 'Parameter "parameter" (object) cannot be of type MS.Internal.NamedObject, as the command type requires an argument of type SharedModels.BookedFlight. Arg_ParamName_Name
6 replies
CC#
Created by Zee on 12/27/2024 in #help
unit testing problem with ICache
No description
6 replies
CC#
Created by Zee on 12/13/2024 in #help
my shared projects are not found. how do I fix?
No description
38 replies
Mmfad
Created by Zee on 11/30/2024 in #questions-and-advice
do vegan boots need shoe trees?
So I was thinking to buy some shoe trees for my vegan boots and shoes but are they needed they’re all from the brand VIRON so it’s that apple leather thing
4 replies
Mmfad
Created by Zee on 11/13/2024 in #questions-and-advice
why does this jacket flare out so much?
No description
3 replies
CC#
Created by Zee on 11/7/2024 in #help
implement stripe payment feature for asp.net core web api and wpf
No description
5 replies
Mmfad
Created by Zee on 11/1/2024 in #questions-and-advice
can you clean mould off fake leather shoes?
No description
5 replies
CC#
Created by Zee on 10/31/2024 in #help
How to display api json data into a wpf page
No description
49 replies
Mmfad
Created by Zee on 10/17/2024 in #questions-and-advice
Body shavers that dont remove all the hair and are good for doing the back?
so I am quite hairy and want to trim my body does anyone have any recs for a good body trimmer I dont want to remove all my body hair maybe take it down to a 3-4.5mm length and I want something that makes shaving the back easy. The current one I have is crap for the back and isnt very good at trimming. My budget is £100 but would prefer to pay less if possible
3 replies
Mmfad
Created by Zee on 10/8/2024 in #questions-and-advice
how to style denim derbies
No description
1 replies
CC#
Created by Zee on 9/28/2024 in #help
the namespace is not recognised
No description
16 replies
Mmfad
Created by Zee on 9/28/2024 in #questions-and-advice
can someone recommend me a cool looking carabiner with a bottle opener please (weird request I know)
No description
13 replies
Mmfad
Created by Zee on 9/1/2024 in #questions-and-advice
breathable socks for people who get sweaty feet
So my feet sweat a lot and I’m looking for some socks that are breathable and help my feet not sweat so much. I’ve heard good things about bamboo socks but they break easily supposedly. I also heard merino wool socks are good but how much wool should be in the sock since most of them are blends. Budget is around 20£ for a 5 pack or something I’m not looking to buy some crazy expensive sock. I like the ones that are start/mid shin please
7 replies
Mmfad
Created by Zee on 8/31/2024 in #questions-and-advice
Watches that have a cream dial and a leather strap.
so I am looking to buy my first watch and I like the look of the orient bambino because it has like a vintage look to it with the cream dial and the brown leather strap but wanted see my other options. so I wanted some recs my budget is £200 this is the one I like but would like some other recs that look similar and a have vintage/old man look https://www.amazon.co.uk/Orient-Analogue-Japanese-Automatic-Leather-FAC00009N0/dp/B01MTS5BFN
8 replies
Mmfad
Created by Zee on 8/20/2024 in #questions-and-advice
how should a cropped jacket fit?
So I’ve been thinking about this lately and wanted to hear what you all think. Now obviously it’s up to the fashion designer to say where the jacket should end. But I would say most regaluar length jackets end mid fly. So where would a crop jacket end? At the hip? At the belly button? Just below the hip etc
7 replies
Mmfad
Created by Zee on 8/17/2024 in #questions-and-advice
does this jacket fit as intended?
No description
7 replies
Mmfad
Created by Zee on 8/9/2024 in #questions-and-advice
Alternative to solovair boots that dont have a big tag on the back with green
No description
27 replies