Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
ATM Machine
Aug 20, 2007

I paid $5 for this
Visual Studio question: I'm curious as to whether there is a productivity extension that replicates Sublimes' features like line duplication, control+d selection searching, or multiple editing locations.

What I'm asking for is a Sublime flavoured Visual Studio. After working with Sublime for so long I really miss being about to ctrl+d a variable or string or whatever, then tap an arrow key to start typing after all of them at once. I was a big fan of being able to highlight something then type in a brace of some sort, and it'd put one either side of the selection.

Adbot
ADBOT LOVES YOU

ATM Machine
Aug 20, 2007

I paid $5 for this
I've got an entity framework question of my own, at least I think it's EF related. Anyway, what I need is a joining table that links 2 PKs from the default user table, with another table that basically tracks edits made and links them to a user.

Now I could just have the editHistory table have a column that links to the ID in the user table, but that goes against n:n, and I'm hoping this wouldn't be the correct thing to do. I'm using MSSQL for this, so I know I can have a table that just has 2 FKs, but how do I a) create this code first when one of the tables is the default user table created by EF or whichever framework is responsible for it, and b) Is it possible to just add rows to this table by sending (userId = user, editId = edit) to the FK table, or would I need to get the ID from the user table first (and add the history to the editHistory table then get its Id), then add that to the FK table?

Sorry if it's hard to understand, and if this is better off as a database question, as I'm not completely used to how EF works yet, and there isn't much help on this matter online either, the main problem being that one of the tables I want to link isn't a table I've created.

ATM Machine
Aug 20, 2007

I paid $5 for this
So I've a weird problem come up concerning MVC routes. Basically I've got a phantom route floating around that's active and will return a 500 indicating that there's a route registered somewhere, but no controller exists for this route anymore, and won't display a server error on debug, so it's not hitting an error handler. If I create a controller for that route and breakpoint it, it won't be hit, and no exceptions will be thrown anywhere.

It's not an issue as the route is only known about in dev, but I know I've run across this issue before. The routes are defined with attributes, and are within an area. I'm thinking it's some weird MVC thing with [RouteArea("...")] in combination with [Route("...")], but with no way to find out where it's lingering I've no way of solving the issue if it happens for another route later on.

However, if I add a trailing slash to that route, the controller will be called, and it'll behave as it should. Remove the route and it'll return a 404, remove the trailing slash and it'll 500 as if it's still hitting a controller somewhere.

I've done clean rebuilds, deleted the obj folder, cleared the routetable on startup, nothing has worked to get rid of it. At this point I'm wondering if anyone else has had this happen, or if it's just me.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply