How can I prefix tables names? - asp.net-mvc-3

How can I add a prefix to the tables names without change my class name?
dbo.Applications (Class Applications {})
dbo.Groups (Class Groups {})
dbo.Locations (Class Locations{})
dbo.Site1_Applications
dbo.Site1_Groups
...
I'm using Visual Studio 2010, SQL Server 2005, .Net 4.0

Related

Where is the EDM tool in Visual Studio 2013 Ultimate Trial?

I just installed VS 2013 Ultimate Trial and I noticed there is no EDM option as shown in the following figure.
Why?
According to ADO.NET Blog, the tool should be available out of the box.
From Visual Studio 2013 onwards we will no longer include the extension that enables configuring an "EDM" data source in this way, e.g. if you add an .MDF file to a project you will no longer see the option to create an EF model, and the option of creating an "EDM" data source based on an existing EDMX model as well as the ability to drag and drop to create data-bound controls automatically in WPF application based on those "EDM" data sources are no longer included.
The recommended ways to create an EF model are either creating the classes,manually (Code First) or adding a new "ADO.NET Entity Data Model" using Add New Item.
The recommended way to do data binding against EF models in WPF applications is through use regular object data sources as explained in this walkthrough.

Is it possible to add custom resource types to a .NET .resx file?

In Visual Studio .NET projects you can create .resx files that contain resources which can be localized. Out of the box Visual Studio recognizes Strings, Images, Icons, Audio, Files and something called "Other" which I don't really understand.
What I want to know - can I extend Visual Studio and add a custom type here - say "Messages" (where a message would contain not only text, but also severity and other flags)? Naturally I would need to provide Visual Studio with my own editor and handle the necessary codebehind genereation, etc - but that's all doable. That is, if Visual Studio allows this sort of extensibility at all. Does it? And if yes, where can I find any documentation on it?
P.S. I'm using Visual Studio 2012.
Yes, this is entirely possible. In order to do this, the type you want to include has to have a TypeConverter that can convert to and from InstanceDescriptor. There is an example of this on MSDN.
Once you have the TypeConverter created, you adorn the type with a TypeConverterAttribute to tell the framework to use that type converter.
For example:
[TypeConverter(typeof(MyTypeConverter)]
public class MyType
{
...
}
Then you can persist values of that type into and out of the resx files.

Multiple Result Set EF 6.0

I have just started using VS 2013 and I would like to know whether the newly release entity framework 6.0 designer in Visual Studio 2013 support multiple result set returned from a stored procedure?
The designer in VS2013 does not support importing stored procedures returning multiple resultsets to the model. You would have to manually modify the edmx - similarly to what you would have to do in the designer from VS2012.

How to change the ObjectContext class name of edmx

The modes and classes are generated by Entity Framework 5 when I updated the mode from exist database . But I want to correct the name of the ObjectContext class. I know we can use the refactor tools of visual studio 2010, But I am not sure all the code files can be updated in this way. please help me .thanks.

Is it possible to prompt the user for information in a Visual Studio template?

Is it possible to prompt the user for more than just a file name when they create a new item from a Visual Studio 2005 template? It would be nice to have more than just the class's name filled in when a template is used.
Apparently, the only way to accomplish this is by creating a WizardExtension (compile a DLL with a class that implements IWizard), and referencing it in the VSTEMPLATE file.

Resources