|
No you are correct it is just a code generation tool (ClassBuilder), I have a bunch of conventions, first field in a table will be the primary key, every table has modified date, each table with a FK will have a view, table name prefixed with vw and a few more.
Projects have a defined structure, models , viewmodels, DAL etc all have defined folders so the code gen can easily find the find the target .cs files.
ClassBuilder generates the CRUD stored procedures, models, data access and interface code is places their files in #regions. Enums and grid xaml is created on demand. #regions are replaced in existing .cs files when there are changes to the table/views.
I pinched ClassBuilder and DBOps from another developer in the 90s, written in VB5 I think. They have been rewritten many times in quite a few languages but have retained the same basic structure. I even have a DBOps for Oracle somewhere.
I guess it generates about 60% of my code, hand coded stored procs and the UI are all manual. Snippets in VS do another 10% of the UI code.
Send me an email and I will happily share it, I thought DBOps was in one of my articles but I was wrong.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
sorry , what this has to do with the question's topic ?
|
|
|
|
|
My bad, seem to have hijacked your thread, sorry.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Mycroft, did my PM not reach you or have I pissed you off?
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
|
|
|
|
|
Takes quite a bit to piss me off, and you have not even started, I have bounced about 5 emails at the web.de address.
The following organization rejected your message: mx-ha03.web.de.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I'm sorry, I have no clue why that happens. I PM you another address.
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
|
|
|
|
|
Well , friends , you made a lot's of comments , but can I have a final solution of my problem ?
Thank you !
|
|
|
|
|
Not all problems can be identified or diagnosed in a couple of forum posts. Any maybe your problem is rather uncommon so maybe no one here has experienced it himself yet or the right person to answer your question hasn't visited this forum yet. You'll either need to be more patient or conduct some research yourself: You could make a backup of your project and database and strip things out one by one in order to identify the relevant factors.
edit:
Theoretically it could also be not directly related to EF but some of your code that for whatever reason gets executed too for every first query. I assume you haven't profiled your code yet - get some profiler and take a look at your query execution:
https://www.google.com/search?q=c%23+performance+profiler&ie=utf-8&oe=utf-8[^]
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
modified 26-May-15 0:18am.
|
|
|
|
|
Is it possible to have a different forecolour on line 1 of the tooltip display? Thanks.
|
|
|
|
|
Sure; you'd have to implement it though, as it is not default functionality of the tooltip. I'd suggest you search this site as it contains examples (with code) on how to personalize tooltips.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I've had a good look around and can't find anything on colours on the first line.
Any links or other pointers you have would be very welcome. Thanks.
|
|
|
|
|
|
Thanks Eddy. Checking it out. I do want a different forecolor on line one (compared to the rest), and your first link mentions a Title color and Description color.
|
|
|
|
|
You're welcome
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Hello !
I have an vb.net 2013 application that use a SQL server database.
Currently I'm using sql server 2008R2.
To Backup / restore database from vb.net I'm using SMO.
But the problem is that when I try my application on sql server 2012 , the backup / restore functions doesn't work anymore , because the SMO files that my application use are for sql server 2008R2.
So I'm thinking is there any way to Backup restore a database that is independent from SQL server version ?
Thank you !
|
|
|
|
|
Create a backup script and execute it?
=========================================================
I'm an optoholic - my glass is always half full of vodka.
=========================================================
|
|
|
|
|
|
The simplest script would be like
BACKUP DATABASE MySQLDatabase
TO DISK = "C:\backups\MySQLDatabase.bak";
You can execute this against your database connection, after changing the database name and file location of the backup file to match your own values.
There are quite a few options to the BACKUP command, but this shows the absolute simplest case. For more details, have a look here:[^]
=========================================================
I'm an optoholic - my glass is always half full of vodka.
=========================================================
|
|
|
|
|
The SMO-libraries are for a specific version of SQL Server. You can use the backup and restore -commands without SMO. That way it should be possible to restore your backup on a newer (!) version of SQL Server. AFAIK, it doesn't work the other way around.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Thank you !
But as I'm comfortable using SMO , is there any way to keep in different fodders , SMO files for a specific version of SQL server, and to alter when I need ? ( just an idea , I don't know if this can work ).
|
|
|
|
|
I'd recommend against using SMO for operations that can be performed using native SQL commands, as it adds a dependency to a specific version of SQL Server. It is also a lot easier to change a SQL-script when there's a need due to difference between versions.
Yes, it is possible to use "all" the SMO libraries, for each different version - but that is definitely not easier; first of all, you'd need to link to various libraries containing the same types and classes, which is something that is usually not done as it creates conflicts.
You could prevent so by loading the library dynamically, using reflection to do what you want - which adds more complexity. Alternative, you decompile the SMO-assemblies and stitch them together into a new one.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Can you give me some help , or where can I read more about Loading the library dynamically ?
Thank you !
|
|
|
|
|
Loading stuff using reflection is not explained in a single post, it is a complete topic by itself. There's articles on CodeProject like "Reflection in .NET[^]", and an article from Visual Studio Magazine[^].
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
|
It cannot be done by simply replacing the assembly, nor by mapping it.
Hence, the recommendation for SQL.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|