0

I am working on my first .NET Web API. I have an existing .NET Windows Forms application using a SQL Server 2008 R2 database, and now I need to write a new app: a straightforward Android tablet application that will access the same database. These apps for just for internal use; not outside the one company.

I have been on a long journey though many tutorials, blogs and posts here, including this I'm lost. What happened to ASP.NET MVC 5? super helpful explanation of .net products and versions. But over and over I get hopelessly confused about which product I should choose to write the Web API. I can't always tell from some of the tutorials whether the ideas and techniques and configurations apply to both .NET Core and .NET Framework, or just one, and if the tutorial works with current versions. I am using Visual Studio 2019.

Does anyone have a recommendation for whether I should be using .NET Framework 4.8, or the new .NET Core?

I do not find this guidance from Microsoft helpful.

I think I should probably use Entity Framework to generate code from my existing database, but I also think I could pretty quickly code SQL calls right into the Web API controllers as I have seen done in some tutorials. Is that considered a bad practice?

Thank you for any steering you might offer.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
VardeVim
  • 27
  • 1
  • 4
  • 1
    I'd really say pretty much the same as Microsoft does in that guidance document: unless you have a **specific** reason not to (special custom hardware with drivers unavailable for .NET Core, or some third-party components that haven't been ported to .NET Core), then I'd go with .NET 5 for any new development. And .NET Core isn't that "new" anymore either .... it's been around since 2016 ..... – marc_s Jan 20 '21 at 04:58
  • And while you're at it - you should **urgently** update to a supported version of SQL Server, too! (2016 and up) – marc_s Jan 20 '21 at 05:29
  • @marc_s actually 2012 and up... – ErikEJ Jan 20 '21 at 05:55
  • @ErikEJ: well, 2012 and 2014 are already in "extended support" - so they're about to be phased out. 2016 and up are "officially" and fully supported - and **if** you're updating - you should definitely go to a fully (mainstream) supported version.... – marc_s Jan 20 '21 at 06:13
  • Thank you for the advice! I'm finding the info easier to sort out now that I know the asp.net core makes sense for my situation And we'll upgrade that server asap. Thank you. – VardeVim Jan 23 '21 at 01:28

0 Answers0