private CodeExampleServices GetCodeExampleService() { var userId = User.Identity.GetUserId(); var service = new CodeExampleServices(userId); return(service); }
public ActionResult UserCode() { var userId = User.Identity.GetUserId(); var service = new CodeExampleServices(userId); var userExampleList = service.GetAllExamplesByUserId(userId); if (userExampleList == null) { return(View()); } return(View(userExampleList)); }