I have a stored procedure:
CREATE PROCEDURE [dbo].[usp_SelectStuff] AS
@param1 int
@param2 int
BEGIN
SELECT [Stuff] FROM TABLE
END
I want to run this from SubSonic, and the use the stuff that has been selected. So I do:
var db = DB.CreateDB();
var stuffProcedure = db.UspSelectStuff(0,1);
Now how do I actually get the data from...
I'm starting an ASP.NET MVC project using SubSonic 3 ActiveRecord. I added a table Users with a primary key ID and recompiled T4 files to generate User class.
I want to make sure that, as I go along with the development, I can regenerate/migrate the database at any point. It looks like I have to create tables and relationships in the da...
I use migrations a lot (only MySQL) and since SubSonic Migrations only allows to define the parent and the master column in CreateForeignKey, I cannot define the update/delete actions in a FK Relation.
However there a quite a number of scenarios where I, for instance, need to define a FK relation where, if I delete the parent record, al...
Hi,
I'm learning SubSonic 2.2, and have the following query, but it feels "Wrong" writing my expression ("count + 1") as a string.
Can any experts suggest a better way that this?
int records = new Update(Wordsfile.Schema)
.SetExpression(Wordsfile.CountColumn).EqualTo("count + 1")
.Where(Wordsfile.Co...
I get my object from the database using my repo like this:
Public Shared Function GetOrderFulfillment(ByVal OrderNumber As Integer) As OrderFulfillment
Dim objCustomerOrder = DB.Select().From(Tables.OrderFulfillment).Where(Columns.OrderNumber).IsEqualTo(OrderNumber).ExecuteSingle(Of OrderFulfillment)()
objCustomerOrder.MarkOld()
R...
Hello,
is there any list of known problems about updating 2.1 to 2.2?
Where do I have to look at,
which methods/classes have ben changed?
Regards,
Martin
...
Is there any way that I can access my SQL views in SubSonic 3.0? The code generation seems to skip views altogether
...
Hi
I have a SP (shortened version):
CREATE PROCEDURE [dbo].[usp_ADMIN_CountExposure]
@whereAge int
,@whereGender int
,@whereSalary int
AS
BEGIN
SET NOCOUNT ON;
DECLARE @query varchar(max)
SET @query = 'SELECT [ID], SUM([Lives]) AS [Lives]
FROM [ExpDB].[dbo].[Ex...
Using SubSonic v2.3 in a web app. Each client (200+) will have their own database. We have been putting in the connect string for the client when we create the repository for the database call. What we're seeing now is that client A may make a request at about the same time as client B. Client A may get client B's data. This seems to hap...
I want to use SQL cache dependency with SubSonic. How can I do this?
...
Are there the asp.net scaffolding controls (ex: < subsonic:QuickTable />) still available in subsonic 3?
...
While using SubSonic 3 with ActiveRecord T4 templates, the generated code shows many warnings about CLS-compliance, unused items, and lack of GetHashCode() implementation.
In order to avoid them, I did the following modifications:
// Structs.tt
[CLSCompliant(false)] // added
public class <#=tbl.CleanN...
Hi,
Can anyone help? When I try to generate my Structs.cs file, the process is failing with the error, becuase the SchemaName is not being returned by MySQL provider.
"
Error 3 Running transformation: System.ArgumentNullException: Value cannot be null.
Parameter name: objectToConvert
at Microsoft.VisualStudio.TextTemplating.ToStr...
I downloaded today Subsonic 3 and tried out the examples. I am having a problem with the SimpleRepository example and I wondered if anyone else has had this. In the HomeController there is a defintion as follows:
public HomeController() {
_repo = new SimpleRepository("Blog");
}
I wanted to enable the migrations an...
I have a problem with the Create View in the SimpleRepository example in Subsonic 3. I get an error at line (28):
<%=Html.DropDownList("CategoryID",new SelectList(Blog.Category.All(),
"categoryid", "description")) %>
Basically, .All() is not known. Does anyone have a solution to this?
Not that should make a difference for this error ...
please show me a demo.
Thanks.
...
Using the new built in testing for Active Record (set "Test" as the connection string) I've hit a problem performing an update.
The code I'm testing pulls an existing object out of the database, makes some changes to it, and then saves it.
public void SaveProduct(string productId) {
var dbProduct = Model.Generated.Product.SingleOrDefa...
I'm trying to use Subsonic 3.0 but with every query I try it gives me this error:
"Invalid cast from 'System.Byte' to 'System.Byte[]'."
I've tried using linq and activerecord on several different tables and always having this problem.
Just to make sure, here is a code snipped that throws the error:
LiteralContent.Text = DB.Teksten.Sin...
Please if anyone knows the answer, I´m still looking for 3 days and nothing..
I make some test with subsonic, SqlServer and MySql and with some little changes in the web.config file everything was good.
But now, I need to work with Oracle . I maked the changes and next command runs
DataTable qry = ModeloDados.DB.Select().From("CARGO"...
I don´t know the answer for this question.
With MSSQLSERVER and MYSQL the next configuration runs very well but with Oracle don´t.
With Oracle appear like this
Cargo c = new Cargo();
c.Idcargo = 1;
With MSSQL AND MYSQL
c.IdCargo = 1;
How to configure the connection with Oracle to appear "IdCargo" and not "Idcargo". ??
THE CONFIGU...