|
Dir all. I am a new here. I just start a Web NETcore 5.0 MVC and the connectionstring has been set in the
appsettings.json like this:
"ConnectionStrings": {
"DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=ManagementSystem;Trusted_Connection=True;MultipleActiveResultSets=true"
}
I know that the database will be create in the "
C:\Users\Nguyen Tuan Anh "
You can see the projet is here: GitHub - nguyentuananh921/HomeJob[^]
I want to setup the database so it is created in Project Folder as a relative not fix so that when I upload to github and then I can come to other pc and clone it without losing data.
Thanks.
|
|
|
|
|
What are your thoughts on an approach that uses Specifications for business logic validation? I know Fluent Validation is probably the most popular tool for doing validation these days, but is it inherently superior to a Specification-based approach?
|
|
|
|
|
More straight-jackets from pet projects of third parties.
The antithesis of "fluent".
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
|
|
|
|
|
Can you expand on your "antithesis of 'fluent'" comment, please?
|
|
|
|
|
Hey,
A bit backstory: I am working for some time on my Text-Templating engine project Morestachio and all the time i compare the performance of Morestachio against other engines like cottle, handlebars.net, scribain etc and with the latest release of .Net5 i was thrilled as microsoft promised another out-of-the-box performance improvement like the one we saw when net.core came out where each version was measurably faster then the previous one. I read some block posts like this one: Performance Improvements in .NET 5 | .NET Blog but when i did my usual performance comparisons I discovered more or less the opposite.
I have two performance metrics: Historical performance tests including only Morestachio using Nunit and a project using the BenchmarkDotNet lib.
BenchmarkDotNet:
.net472:
| Method | Mean | Error | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|------- |---------:|----------:|----------:|---------:|--------:|------:|----------:|
| Bench | 2.019 ms | 0.0041 ms | 0.0036 ms | 257.8125 | 15.6250 | - | 1.57 MB |
.NET5:
| Method | Mean | Error | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|------- |---------:|----------:|----------:|--------:|-------:|------:|----------:|
| Bench | 2.219 ms | 0.0044 ms | 0.0039 ms | 85.9375 | 3.9063 | - | 705.5 KB |
.NetCore 3.1:
| Method | Mean | Error | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|------- |---------:|----------:|----------:|--------:|-------:|------:|----------:|
| Bench | 1.427 ms | 0.0035 ms | 0.0033 ms | 95.7031 | 5.8594 | - | 783.67 KB |
this also performance difference is also present in the other test (i will not bother to post here).
Yes Net5 is way more efficient in memory consumption but in comparison slower then even pre NetCore.
|
|
|
|
|
If I put bigger or smaller wheels on a car, it will affect it's speed; all other things being equal.
Memory and response time is like that. And we have different cars.
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
|
|
|
|
|
|
For an article I wanted to create a VB.Net demo project with Master/Detail GridView and RichTextColumn.
Parts of my demo project are taken from CP articles about Master/Detail GridViews.
But most of them have the issue with the keys not working on the childView - that prevents moving through the child grid with arrow keys.
Same happens with keys page up/down and pos1/end.
Example: DataGridViewExtension[^]
Instead of navigating through the childView those keys let you navigate through the Main/Parent Form.
There is only one without that issue - but in C# and I do not understand how the issue is fixed there:
Master Detail Datagridview in C#[^]
That's why I tried to do the childView with my own subForm, but that was no good idea.
Today I could migrate that C# project (without the issue) to vb and got it working - without the keys issue.
But still cannot see the reason for the keys issue and why all works in the Master Detail Datagridview in C#.
Any ideas what causes the keys issue and how to fix it?
modified 11-Nov-20 13:53pm.
|
|
|
|
|
The "parent key" is used to filter children in the "child view"; that's it.
Every time the selected parent changes, a new set of children is retrieved or filtered using the parent key.
That's the pattern. How people choose to abuse it, is another matter.
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
|
|
|
|
|
I probably do not understand what mean - why should an 'Id'-Key which filters the datasource of the childView control have any effect on the function of the 'Keyboard'-Keys for the childView control?
modified 12-Nov-20 6:10am.
|
|
|
|
|
It doesn't. Where did I mention "key board"?
If your problem is that your "app" is not behaving as "expected", it's because you've either hooked up something wrong, or didn't when you should, or defeated it's default behavior.
I was telling you what "should" happen. You implement parent-child relations; they don't just "happen".
(And VB had "navigation controls" that c# never had).
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
|
|
|
|
|
hey bro i want to add audit trail to my project ,bro i was seen your post about that but not working for me can u help me , i use asp.net core 3
|
|
|
|
|
|
it is not working for me i want audit log not logging logs !!
|
|
|
|
|
It is exactly the same concept. The important thing is what information you put in the log.
|
|
|
|
|
i'll try more different ways but not working for me , i want audit to record every things in my system where user performed !
|
|
|
|
|
We have no idea what you are doing, or what you mean by "not working for me". If you want help with a programming problem then you need to provide proper details.
|
|
|
|
|
I think he's missing the part where one actually "calls" the logger.
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
|
|
|
|
|
I think he's missing much more than that.
|
|
|
|
|
Audit what?
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
Such a concise and detailed question (it' not working for me) deserves a a detailed response - then fix it.
Are you trying to audit database changes, keystrokes on the web site, movement through your web site. What are you trying to achieve, if you give us some detail we may be able to help you.
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
hi bro ,i want to add audit log to my all tables in my projects when users delete or create or update data in system
|
|
|
|
|
Member 13408259 wrote: i want to add audit log to my all tables Then please get on and do it. You asked this question a month ago, what have you done since then?
|
|
|
|
|
You have a choice, depending on your database you can add triggers spit to audit activity or you can add some sort of auditing to your DAL in c# that records each activity into the database.
Personally I create triggers spit in the database to audit all master file tables IE I do not audit transaction tables.
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
Keypress and keydown event occurs when click on flexgrid control but value is not showing.when use doubleclick event is working that.
|
|
|
|