|
I'm now designing a new application that will run only on Windows. No other platforms.
Is there any reason to develop it in .NET Core as opposed to Framework?
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
AFAIK, .NET Framework 4.8 is the last of the Windows specific framework. Everything goes .NET (Core) from now on, so it's only a matter of time before your app needs to be converted to a .NET app.
|
|
|
|
|
Technically, the choice is between .NET Framework 4.8 and .NET 5 now.
Announcing .NET 5.0 | .NET Blog[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
[HttpPatch("{id:int}")]
public async Task<IActionResult>UpdatePartialAsync(int id, [FromBody] JsonPatchDocument<TEntity> patchEntity)
{
var entity = await _service.ReadAsync(id, false);
if (entity == null)
return NotFound();
try
{
patchEntity.ApplyTo(entity, ModelState);
}
catch(Exception ex)
{
return Ok(ex.Message);
}
entity = await _service.UpdateAsync(id, entity);
return Ok(entity);
}
When accessing this in PostMan, the return is an error, patchEntity has one Operation with all values being null.
Any ideas?
|
|
|
|
|
thewizardoftn wrote: the return is an error
Are we supposed to guess what the error is?
thewizardoftn wrote:
return Ok(ex.Message); Returning an "OK" response for an exception seems like a particularly bad idea.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
You didn't check if patchEntity was null before dereferencing it.
"Fairy tales do not tell children the dragons exist. Children already know that dragons exist. Fairy tales tell children the dragons can be killed."
- G.K. Chesterton
|
|
|
|
|
i got error when i want to add sql server in visual studio 2019
Unable to add data connection. Could not find any resources appropriate for the specified culture or the neutral culture. Make sure -Microsoft.VisualStudio.Data.Providers.SqlSetver.SqlViewSupp ort.xmr was correctly embedded or linked into assembly Microsoft.VisualStudio.Data.Providers.SqlServer at compile time, or that all the satellite assemblies required are loadable and fully signed.
|
|
|
|
|
This is exactly the same question as the one below. And if both of those accounts belong to you, you should delete one of them.
|
|
|
|
|
In Visual studio 2019, when opening the database, the program displays the message:
Could not find any resources appropriate for the specified culture or the neutral culture.
Make sure "Microsoft.VisualStudio.Data.Providers.SqlServer.SqlViewSupport.xml" was correctly embedded or linked into assembly
"Microsoft.VisualStudio.Data.Providers.SqlServer" at compile time,
or that all the satellite assemblies required are loadable and fully signed.
Can anyone advise me how to solve this problem?
Well thank you
|
|
|
|
|
|
Hi all, how can I add the x clear button to textbox controls on a web page ? I've googled and only see references to Telerik - is this doable without third party controls ?
"I didn't mention the bats - he'd see them soon enough" - Hunter S Thompson - RIP
|
|
|
|
|
The browser will do it if you use type="search" instead of type ="text". Otherwise, I believe you'll have to write your own css and JS to do it.
There's probably examples online if you want to do it custom.
|
|
|
|
|
Hi, I tried type = search but no cross - not a big deal as it's only a personal project
"I didn't mention the bats - he'd see them soon enough" - Hunter S Thompson - RIP
|
|
|
|
|
pkfox wrote: I tried type = search What browser? You do have to start typing for it to show up.
See Tryit Editor v3.6[^]
|
|
|
|
|
Hi and thanks for replying, I use Firefox, tried the link you posted and still no x
Tried it with Edge and it worked
"I didn't mention the bats - he'd see them soon enough" - Hunter S Thompson - RIP
|
|
|
|
|
Yep, you're right. I thought all browsers had started doing that now but I guess not.
|
|
|
|
|
Never mind - as I said it's only a personal project - thanks again
"I didn't mention the bats - he'd see them soon enough" - Hunter S Thompson - RIP
|
|
|
|
|
My project has a complete management part and the front is just a dynamics. I have a problem. How can I solve this problem?
|
|
|
|
|
Quote: I have a problem. How can I solve this problem? How could anyone here possibly answer such a question?
|
|
|
|
|
You might want to try describing the problem in detail if you want any kind of answer at all.
|
|
|
|
|
How did you manage to find your way here?
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
Hi all, I copied the html shown below from a tutorial on how to use the JQuery datepicker. If I run it in Visual Studio ( it's part of an MVC project) it works perfectly.
I want to add the functionality of this to my personal project which is a net core Web app
I've tried adding the link and script references to _layout.cshtml and set the id of my date properties to "datepicker" but I don't see the datepicker popup. Anyone know what I'm doing wrong or missing ?
<head>
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css" />
</head>
@{
ViewBag.Title = "Index";
}
@model JQueryDatePicker.Models.Customer
@using (Html.BeginForm("index", "home"))
{<br />
<div>
@Html.LabelFor(c => c.JoinDate) @Html.TextBoxFor(c => c.JoinDate, new { id = "datepicker" })
</div>
<br />
<div>
<button type="submit" class="btn btn-default">
Submit</button>
</div>
}
<script src="//code.jquery.com/jquery-1.10.2.js" type="text/javascript"></script>
<script src="//code.jquery.com/ui/1.11.2/jquery-ui.js" type="text/javascript"></script>
<script type="text/javascript">
$("#datepicker").datepicker({
changeMonth: true,
changeYear: true,
numberOfMonths: 2,
dateFormat: 'dd-mm-yy'
});
</script>
"I didn't mention the bats - he'd see them soon enough" - Hunter S Thompson - RIP
modified 22-Jun-21 3:39am.
|
|
|
|
|
I added type="datetime" to the anonymous type and tweaked the script to the below and it worked. The added bonus is it works for all datetime properties
$(document).ready(function () {
$('input[type=datetime]').datepicker({
numberOfMonths: [1, 1],
dateFormat: "dd-M-yy",
changeMonth: true,
changeYear: true
});
});
@Html.TextBoxFor(m => m.DateUsed,new {type="datetime"})
"I didn't mention the bats - he'd see them soon enough" - Hunter S Thompson - RIP
modified 20-Jun-21 11:15am.
|
|
|
|
|
pkfox wrote:
<script src="//code.jquery.com/jquery-1.10.2.js" type="text/javascript"></script> That's a really old version of jQuery, which no longer receives patches.
The current version is 3.6.0; you only need to stick to the v1 branch if you need to support Internet Explorer 6-8, Opera 12, or Safari 5.
Browser Support | jQuery[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thanks Richard - as I said I copied it from a tutorial for use in a personal project so no big deal - I'll update the links though - do I need to update the css also ?
"I didn't mention the bats - he'd see them soon enough" - Hunter S Thompson - RIP
|
|
|
|