ASP.NET MVC

Merged into C# chat on 4/19/21. Post messages there please as ...
May 3, 2019 14:03
I was also looking at a gulp task in teamcity to run a babel transpile but didn't see any examples of anyone doing that either
May 3, 2019 14:02
I was looking at babel through the React.NET nuget package to do some BabelBundel or BableTransform things but couldn't find any examples for transpiling. I saw plenty for taking jsx files and bundling those..
May 3, 2019 14:02
@Alex
May 2, 2019 18:33
Anyone have an experience using a javascript transpiler in a .net environmnet? Either via a VS plug-in/nuget-package/teamcity build ..?
Oct 1, 2018 18:31
Can you add a default value insetad of null?
Oct 1, 2018 18:30
ThenByDescending?
Oct 1, 2018 17:36
Should be able to do something like candidates.OrderBy(x => x.SalaryWanted).ThenBy(x => x.ApplicationDate).ToList();
Oct 1, 2018 15:55
I think so
Oct 1, 2018 15:50
Dude I can't just tell you that. I don't think your code is organzied the right way. I agree that you need a WebApi controller but it shouldn't be returning a View();
Oct 1, 2018 15:47
Why do you need a WebApi controller?
Oct 1, 2018 15:44
Yeah, change the base class it's inhering to just "Controller"
Oct 1, 2018 15:42
Do you have a controller named BooksController?
Oct 1, 2018 15:37
@Riccardo you should have two sets of controllers, normal MVC controllers to return a view (even if it just embeds a single-page javascript app) and a set of WebAPI controllers that your javascript will make calls to to retreive data
Oct 1, 2018 14:51
WebApi controllers shouldn't have views
Oct 1, 2018 14:14
It's possible that file is cached, or simply not the file you think it is. Angular can be very trickey
Oct 1, 2018 13:39
well somewhere something needs to be defined that is either a localhost or an freightApi.com. Can you run the app with dev tools open and see where the data is actually coming from?
Oct 1, 2018 13:11
where is this.apiUrl defined?
Oct 1, 2018 13:04
Sometimes people split Api's from the front-ends for scalability reasons
Oct 1, 2018 13:03
It's possible that the api isn't in your project at all. For the url provided, do you see any "base" urls nearby? Whatever goes in front of ___/api/freightelement/GetElements
Oct 1, 2018 12:57
It's essentially just a controller that doesn't return a view, only data. You generally hae a Controllers/Api/ folder that contains things like FreightElementController.cs
Oct 1, 2018 12:53
as a single string
Oct 1, 2018 12:53
^ that string might not be defined in the controller if it has a base route of only api/freightelement
Oct 1, 2018 12:52
you should have some controllers soomewhere that have freightelement defined as a base rought and a GetElements route within that controllers
 

C#

General discussions about the c# language, Squirrels | gist.gi...
Jul 7, 2017 22:03
I wasn't in charge of setting it up, but it was easy to learn and work with once the heavy lifting was done
Jul 7, 2017 22:03
My last job that I brought up had several different data repositories that each provided data to a service later that did the work/ returns the data to the controller
Jul 7, 2017 21:53
My bad, I wasn't aware :(
Jul 7, 2017 21:53
that is the big part there, yes. Bringing the .NET framework to linux is a big deal and it's a work in progress
Jul 7, 2017 21:51
I haven't followed up on it recently, but last time I checked (6+months) it was still a bit buggy
Jul 7, 2017 21:51
Not iOS just yet. Linux probably ? That part is still pretty new but the plan is, yes, you will soon be able to deploy on Linux
Jul 7, 2017 21:46
.net core is also becoming available on linux machines, so it's going in all the right directions
Jul 7, 2017 21:45
Espescially with them pushing Azure web services so hard lately
Jul 7, 2017 21:45
.Net is a Microsoft thing. It's not going anywhere anytime soon. And I think they're making their new things open source, so it should be getting bigger and more support as time goes on
Jul 7, 2017 21:40
There is nothing wrong with using HTML/bootstrap on your front-end and using a C# .NET framework on the back. I guess my suggestion would to just pick something and hit the ground running. A lot of people have different preferences, and there is no right answer, which is my most opinion based questions get closed
Jul 7, 2017 21:33
Not familiar with core//core 2, so can't offer advice there
Jul 7, 2017 21:33
@OTANO My previous job had an MVC website that split our controllers into web and api controllers, where the web controllers served raw html/css/angular apps and those angular apps made asycn calls to the api controllers, I really liked that structure
 

SQL

Got a SQL question? Any SQL flavor here, just ask. Indicate yo...
Sep 23, 2016 14:57
Ok cool, thanks a lot
Sep 23, 2016 14:56
Didn't know what phrase to google to figure it out
Sep 23, 2016 14:56
@Shaneis is that all that means? Not equal to? I just wasn't sure what " <> '' " was doing
Sep 23, 2016 14:29
Guys, what is this syntax called: WHERE Carrier <> ''
 
Jul 27, 2016 13:35
I'm going to leave one and the link to the chat just in case anyone else ever feels the need to express their opinion.
Jul 26, 2016 21:35
It has been, enjoy your day :)
Jul 26, 2016 21:30
Especially the little strings on the end, but I guess them being smaller is what made me want them to stand out more.
Jul 26, 2016 21:29
I couldn't find anything definitive either. For what it's worth, it took me about 3 revisions of my own edit to work up to wanting to make those strings into code-blocks, so I'm not super on my own side, just a little bit.
Jul 26, 2016 21:22
I understand that, and it makes sense. I guess my point is that the grey background of the code block helps certain things stand out, and I tend to think that expected output/input warrants that distinct, kind of like stacktraces, but on a smaller scale.
Jul 26, 2016 21:16
I might throw up a META post just to see if there is a consensus on convention, but the last time I made a META question the spread was +2/-12 so we'll see how my opinion holds up this time.
Jul 26, 2016 21:14
@AndrewMorton I wasn't trying to start a fight, and I agree with for everyone. I'm simply projecting my opinion onto everyone, which I realize is unrealistic, but finding the true opinion of everyone is also unreasonable. The big reason I use code blocks for output strings is so when I'm trying to answer a question, I can scroll back up and down and my eyes are drawn to those blocks more easily.
Jul 26, 2016 21:14
@AndrewMorton Aside from the markdown being labeled code I've found nothing that limits it's use to code. Everything I've read implies "Make the question easier to understand", which in my opinion applies to expected vs. actual output.
Jul 26, 2016 21:14
@AndrewMorton is that officially written anywhere? I've always found it easier to read strings if they stand out, but I am open to not doing it anymore.
 

Android

Don't say hi. Don't ask questions. Don't have fun. Don't do an...
Oct 31, 2014 20:01
Do I need to do anything special to de-grade my minimum sdk? My manifest and build.grade both say 17, but the manifest that builds still says "L".
Oct 31, 2014 19:49
good talk.