Hello,
I have a SQL server with 50 databases. Each one has the exact same schema.
I used the awesome Subsonic 2.2 create the DAL based on one of them.
I need to loop though a list of database names and connect to each one and perform an update one at a time.
If there a way to alter how subsonic uses the connection string. I believe I w...
I'm trying to figure out the correct way to atomically increment a counter in one table and use that incremented value as an pseudo display-only ID for a record in another.
What I have is a companies table and a jobs table. I want each company to have it's own set of job_numbers. I do have an auto increment job_id, but those numbers a...
Hi,
I have an application that must be accessed for many users.
To optimize the performance I intend to store each user profile information at a independant database file.
I need everytime a user login the application, to setup a new provider linked with his own database.
All databases have the same structure. So while querying user th...
Disclaimer: I jumped to C# 2008 recently and SubSonic 3 (3.0.0.4) at the same time. I haven't used Linq for much of anything in the past.
Is there an easy way to use the foreign key display value for sorting, rather than the FK Id (which is numeric)?
I've added a new Find method in my ActiveRecord.tt to help with sorting based on a st...
Hi all,
I have couple foreign key relationships in my tables, where multiple keys reference to the same primary from a different table. Whenever I try to run the "Run Custom Tool" when I make changes/add/delete new table, from time to time, the generated class append a different number. For example, at the moment, I have this generated ...
When sending data to a stored procedure through SubSonic, how can I pass a dbtype.structure?
I have a TVP defined as READONLY, and when SubSonic generates the StoredProcedures.cs file, the parameter shows up as a string type.
What is the way to accomplish this?
Thank you.
...
In SubSonic 3.04's SimpleRepository, I cannot seem to perform a Contains operation within a lambda expression. Here's a trivial example:
SimpleRepository repo = new SimpleRepository("ConnectionString");
List<int> userIds = new List<int>();
userIds.Add(1);
userIds.Add(3);
List<User> users = repo.Find<User>(x => userIds.Contains(x.Id))...
I am using subsonic repository pattern(2.1) for asp.net mvc application.In my application,there are many repositories like categoryRepository,Blogrepository etc.Inside each of this repository i am calling subsonic's DB.Select().From()...ExecuteReader() and then loading domain objects from those reader.
In the controller action i make m...
Hello i need some help i work for a small non profit teaching program and i would like to change the logo of Subsonic. The logo where you connect to and login is this possible.
Any help please Thanks...
...
Basically, I'm having the same problem as detailed here, but in SubSonic 3.0. Unfortunately, I can't figure out how to change the provider in SubSonic 3.0.
Is this something I need to change in the MySQL.ttinclude, Settings.ttinclude or one of the T4 templates? Or does it go in config somewhere?
Thoughts? Suggestions?
...
Ok I have the following, set-up and working great. These lines of code should do a conversion from DAL Entity (Subsonic) to a ViewModel.
IList<ProductOptionModel> OptionsRetData = new List<ProductOptionModel>();
foreach (var CurProductOption in this.ProductOptions)
{
OptionsRetData.Add(CurProductOption.ToDataModel(...
Hi,
I want to execute the following query using Subsonic:
SELECT MAX([restore_date]) FROM [msdb].[dbo].[restorehistory]
While the aggregate part is easy for me, the problem is with the name of the table. How should I force Subsonic to select from different database than default one.
More details:
This is the way I do it in my proce...
I Tried GODaddy and BizHost.Net, neither works.
Any ideas?
...
Hi all, I'm very much new to SubSonic and need a little guidance. Here, I want to know how my SP should return a value. Currently, when I execute it I simply pass an Int and it returns me a string value. Here is code:
SubSonic SP:
public static StoredProcedure GetQuote(int? CategoryId)
{
StoredProcedure sp = new Store...
I am using subsonic simplerepo with migrations in dev and it makes things pretty easy but I keep running into issues with my nvarchar columns that have an index. My users table has an index defined on the username column for obvious reasons but each time I start the project subsonic is doing this:
ALTER TABLE [Users] ALTER COLUMN Userna...
I'm just writing my first "Hello World" program using Subsonic, for which I've thrown together a simple little Customer/Invoice/InvoiceItem/Product database.
The connection was successfully made to the DB, and it generated all the right ActiveRecord classes. But for some reason, the Invoice class has a property called Customers, which ...
Hi, folks.
We are trying out Subsonic, and have a situation where we need to work with stored prcedures that are retuning XML, and are used in the app through an XmlReader.
How would one go about handling this situation with Subsonic?
...
I need help creating a LINQ SQL with subsonic. First the basics, this works fine:
var query = (from o in bd.concelhos
orderby o.descricao
select o);
var results = query.ToList<concelhos>();
However, I want to filter out some columns and I have created the following code:
var query = ...
I'm trying to do a simple UPDATE ... WHERE ISNULL() using SubSonic ActiveRecord and the only way I can get it to work is by using CodingHorror. eg:
public void MarkMessagesRead(long? from_person)
{
if (from_person.HasValue)
{
_db.Update<message>()
.Set(x => x.is_read == true)
...
Hi Guys,
I have Visual 2010, I am trying to generate dal from my database.
I create a classlibrary project
I add reference to Subsonic
I add reference to mysql
create generated file in directory
I add a App.config file and fill it as this:
I create the external tools button and run it,
...