|
Ithaqua posted:I'm guessing they're targeting the people who want something better than MySQL but less expensive than Oracle. PostgreSQL saddles that range quite nicely. However, I'm excited for the possibility of running a .NET Core website using SQL Server for Linux all on a VPS from Digital Ocean or something for my side projects and taking Windows out of the equation entirely.
|
# ? Mar 7, 2016 23:47 |
|
|
# ? Jun 12, 2024 11:25 |
|
I also use var everywhere I can. I agree with what other posters have said, that the loss of information from the definition shouldn't be an issue if you have well-named variables and well-named methods. For example, someone posted an example:code:
Edit: That said, I'm tolerant of both approaches. People do what works well for them. As others have pointed out, consistency is the major concern.
|
# ? Mar 7, 2016 23:56 |
|
Edit: nvm I got it figured out.
putin is a cunt fucked around with this message at 12:30 on Mar 8, 2016 |
# ? Mar 8, 2016 11:18 |
|
Is there anyway to prevent the EF templates from overwriting modified classes? I have added constructors to the majority of my class I don't want those changes getting nuked every time I run update model from database.
|
# ? Mar 8, 2016 16:43 |
|
Calidus posted:Is there anyway to prevent the EF templates from overwriting modified classes? I have added constructors to the majority of my class I don't want those changes getting nuked every time I run update model from database. Haven't done DB-first EF in a while, but aren't the model classes partials? You can just make a new partial file somewhere to add the things you don't want the code-generator to touch.
|
# ? Mar 8, 2016 16:58 |
|
Yeah, either use partial classes or change the template to include the extra stuff you want if that's possible. In general you should never modify autogenerated files manually.
|
# ? Mar 8, 2016 17:19 |
|
well if feel stupid now, I didn't even realize they were partial classes.
|
# ? Mar 8, 2016 18:02 |
|
I'm working on a project in MVC that's used to edit TV channels and is taking the place of a spreadsheet.. So for a given criteria, you have 400 channels being displayed and they want to edit them in line. It's mega slow. Using glimpse, 99% of the slowdown is in ViewResult.ExecuteResult(). I'm running in release mode, I've removed other viewengines besides Razor, and I'm directly linking to the view like this:code:
code:
|
# ? Mar 9, 2016 15:14 |
|
What happens if you paginate the results in some way? Just from a UX perspective, displaying a list of 400 items isn't really usable.
|
# ? Mar 9, 2016 15:23 |
|
Ithaqua posted:What happens if you paginate the results in some way? Just from a UX perspective, displaying a list of 400 items isn't really usable.
|
# ? Mar 9, 2016 15:26 |
|
How slow is it? I really wouldn't expect just 400 records to cause a significant slowdown. To get a better idea of what could be causing the slowdown, try using the Stopwatch to time how long it takes to generate the partials, e.g.: C# code:
Other misc ideas: Try inlining the partial EDIT: also how many Sources, Providers, ChannelTypes, and Encryptions are there? Bognar fucked around with this message at 15:44 on Mar 9, 2016 |
# ? Mar 9, 2016 15:27 |
|
Bognar posted:How slow is it? I really wouldn't expect just 400 records to cause a significant slowdown. I initially had the partial inlined, and moved it to a partial thinking it might help. I'm playing around with stopwatch now to pinpoint. What would a manually built input/select look like?
|
# ? Mar 9, 2016 15:36 |
|
Instead of a partial, what if you tried using a @helper method in the main view to render your sub-forms. Calling partial views incurs a significant overhead, and you have that in a loop of XXX items. I'd do a quick test without the form (i.e. just render the drop downs) and see if performance is better. I'll bet it will be. http://www.asp.net/web-pages/overview/ui-layouts-and-themes/creating-and-using-a-helper-in-an-aspnet-web-pages-site edit: Beaten, if you tried that, with your update. Can you post the model? Is there anything weird with those properties? B-Nasty fucked around with this message at 15:39 on Mar 9, 2016 |
# ? Mar 9, 2016 15:36 |
|
Uziel posted:What would a manually built input/select look like? Disregard that suggestion, you aren't actually using the expression form of the helpers so I don't think you would gain much by manually building it. Uziel posted:601 sources This may be causing the problem? 600 sources on each row by 400 rows is 240,000 total options in dropdown lists. edit: math! If you just consider the 17 bytes from the string <option></option> then you are generating 4 MB of option tags just for one column of dropdowns. Bognar fucked around with this message at 15:49 on Mar 9, 2016 |
# ? Mar 9, 2016 15:43 |
|
Bognar posted:Disregard that suggestion, you aren't actually using the expression form of the helpers so I don't think you would gain much by manually building it. Uziel fucked around with this message at 16:02 on Mar 9, 2016 |
# ? Mar 9, 2016 15:57 |
|
Bognar posted:PostgreSQL saddles that range quite nicely. However, I'm excited for the possibility of running a .NET Core website using SQL Server for Linux all on a VPS from Digital Ocean or something for my side projects and taking Windows out of the equation entirely. sql server is amazingly expensive to the point where the windows os license might as well be free
|
# ? Mar 9, 2016 16:05 |
|
Malcolm XML posted:sql server is amazingly expensive to the point where the windows os license might as well be free It's not the Windows license that bothers me, I just hate managing remote Windows boxes.
|
# ? Mar 9, 2016 16:13 |
|
Looks like you're already on track to solving your issue, but I had a couple thoughts about your predicament.Uziel posted:Being able to see all of them at once is an absolute requirement, so I need to approach it from the angle of speeding it up as much as possible. You're trying hard to solve a technical problem but what you really have is a people problem. People are used to a big spreadsheet, where anything is editable anywhere at all times. But they're not using a spreadsheet anymore, are they. I find myself in this situation often (our clients are in the construction industry, "resistance to change" is an understatement). And often times, you can eventually win your users over, by delivering the facts in a way that shows you're working with them, not against them (eg "it's a clumsy error-prone spreadsheet that only 1 person can edit at a time, or a web page that takes forever to load, trust me you don't want either of those, so let's look at some other options together). The phrase I end up using, at a strategic point in the conversation, is "in two weeks you won't even remember what the old way looked like" Honestly, I've found as long as you give users a sense that you're going to take care of them, those absolute requirement turn out to be more flexible than you might think.
|
# ? Mar 9, 2016 16:20 |
|
epalm, you are absolutely correct. We normally take that approach with users for everything, this is one of those exceptions where developer time is being allocated to replace a spreadsheet for a SINGLE person, and it's entirely political. It's basically been handed down to just do it exactly as this one person wants from 4 levels of management above me. I hate projects like this, but thankfully they are exceptionally rare. Having multiple dropdowns is the problem it seems. Removing dropdowns entirely makes the view render quickly, so I'll go the modal route for everything.
|
# ? Mar 9, 2016 16:25 |
|
Ahh bummer! Sorry to hear you're The Chosen One for "one of those projects"
|
# ? Mar 9, 2016 16:34 |
|
LOOK I AM A TURTLE posted:Yeah, either use partial classes or change the template to include the extra stuff you want if that's possible. In general you should never modify autogenerated files manually. Any Advice on adding Data Annotations to those auto generated files?
|
# ? Mar 9, 2016 18:28 |
|
Calidus posted:Any Advice on adding Data Annotations to those auto generated files? You can modify the template. Here is an example. I found it more trouble than it's worth though. Instead of annotations, I just implement it explicitly in the partial class file. Example: Auto-gen file C# code:
C# code:
|
# ? Mar 9, 2016 19:09 |
|
Your my Hero.
|
# ? Mar 9, 2016 21:07 |
|
Calidus posted:Your my Hero. Well, in that case let me throw this out there too so it's complete. You'll notice an extension method in my validation partial class. It's not mine. I had trouble finding the source page but, I pulled it from somewhere. C# code:
|
# ? Mar 10, 2016 19:41 |
|
The customer service drone I am communicating with about a frown I sent just cannot wrap her head around the idea of a program that runs without crashing yet still demonstrates a failure mode. I sent the demonstration project. I sent expected output. I sent actual output. The response: "It's building and running, please send exact reproduction steps." Yes, I know it's building and running, that was never the problem
|
# ? Mar 10, 2016 19:50 |
|
If I type in something that's part of a built-in method and then type something else like "." it auto-completes that method. How do I get it to not do that? I'd rather have it set to where I hit a button to confirm I want that completion.
|
# ? Mar 12, 2016 07:42 |
|
22 Eargesplitten posted:If I type in something that's part of a built-in method and then type something else like "." it auto-completes that method. How do I get it to not do that? I'd rather have it set to where I hit a button to confirm I want that completion. press escape
|
# ? Mar 12, 2016 09:34 |
|
So there's no way to set it to not auto-complete by default? I really hate how that's becoming normal.
|
# ? Mar 12, 2016 09:43 |
|
There's a way, although it may not give the exact behavior you're looking for. If you press Ctrl + Alt + Space you'll toggle Intellisense between Completion Mode and Suggestion Mode. In Suggestion Mode it'll show the list of candidate symbols but it will never auto-complete by itself. If you press Tab it will fill in what it considers the most likely candidate (i.e. the same one it would autocomplete with in Completion Mode), or you can use the arrow keys and Enter to select another entry in the list.
|
# ? Mar 12, 2016 10:53 |
|
Awesome, that's exactly what I'm looking for. That's similar to Eclipse.
|
# ? Mar 12, 2016 16:22 |
|
We're getting ready to build a web portal for internal and public operations. Seeing the recent talk here around asp.net 5/core, is it not advisable to use this for creating an azure web app? Everything will be running on azure, including using Azure AD for authentication. I was a little confused if you guys didn't think it was ready at all for production use or only in certain configurations (Linux/mac/etc). Essential fucked around with this message at 05:23 on Mar 14, 2016 |
# ? Mar 14, 2016 04:15 |
|
Essential posted:We're getting ready to build a web portal for internal and public operations. Seeing the recent talk here around asp.net 5/core, is it not advisable to use this for creating an azure web app? Everything will be running on azure, including using Azure AD for authentication. The RCs have stabilized a bit but I think it's still a bit immature. You're going to be scratching your head a lot and dealing with dependencies that are still being updated and breaking on a pretty regular basis. I love the approach they're taking and it's going to be wonderful, but it needs time to mature. Super looking forward to being able to Dockerize applications.
|
# ? Mar 14, 2016 04:44 |
|
Ithaqua posted:The RCs have stabilized a bit but I think it's still a bit immature. You're going to be scratching your head a lot and dealing with dependencies that are still being updated and breaking on a pretty regular basis. Got it, thanks Ithaqua! With how quickly we are hoping to have this up and running I don't want to add unnecessary headaches.
|
# ? Mar 14, 2016 05:24 |
|
Wait a year.
|
# ? Mar 14, 2016 06:54 |
|
Yeah, I would not go production with Core before 2017. It is still raw as hell.
|
# ? Mar 14, 2016 08:03 |
|
My company has some old MVC 3 apps that we want to upgrade. One issue we've run into is that starting in MVC 4, they changed the way they render boolean values in html attributes. Previously this: code:
code:
code:
|
# ? Mar 14, 2016 23:17 |
|
Unfortunately there's no way to toggle that rendering option site-wide, to my knowledge. You can simply call .ToString() on all your boolean values to get the old behavior back, but that doesn't help you find all the places it's used. If you're lucky and people used ViewModels for all your Views and avoided the use of ViewBag, then finding all the usages shouldn't be too hard. ReSharper's structural search and replace would make this amazingly easy if only it supported Razor syntax (it does C#, HTML, CSS, and JavaScript, but no cshtml).
|
# ? Mar 15, 2016 14:59 |
|
Bognar posted:Unfortunately there's no way to toggle that rendering option site-wide, to my knowledge. You can simply call .ToString() on all your boolean values to get the old behavior back, but that doesn't help you find all the places it's used. If you're lucky and people used ViewModels for all your Views and avoided the use of ViewBag, then finding all the usages shouldn't be too hard. Thanks. That's basically what I figured. This was pretty much just a last ditch effort to avoid hunting for every instance.
|
# ? Mar 15, 2016 15:16 |
|
View Components look promising but Partial Views got axed after 2 .net revisions so it kinda makes me want to stay way from them. I also don't see a huge advantage when compared to just using json and js.
|
# ? Mar 15, 2016 20:37 |
|
|
# ? Jun 12, 2024 11:25 |
|
Any advice on how to securely store an access token in Azure? We're going to start reporting on our customers QuickBooks data via an automated process, which means we need to store the qb access token after the user puts in their credentials. The users will be in Azure AD and we have access to any/all azure services that may be needed. In doing some research I've seen a suggestion of creating a Claim (I think membership claim?) for users authenticating via the standard asp.net authentication. I'm assuming there must be a secure storage spot for this in Azure AD membership?
|
# ? Mar 15, 2016 20:54 |