hi, i am using subsonic 3.0 and active record with a mysql database
now everything is fine, but i cant seem to create views see example:
public ActionResult Index()
{
return View(contact.GetPaged(1,20));
}
now normally i would right click and choose Add View
i would then choose strongly typed and find the class for the...
With SubSonic 3 / ActiveRecord, is there an easy way to compare two records without having to compare each column by column. For example, I'd like a function that does something like this (without having to write a custom comparer for each table in my database):
public partial class MyTable
{
public IList<SubSonic.Schema.IColumn> C...
hi i am using subsonic 3 and activerecord it is my first time with this and i was just wondering if anyone can point me to some reading material with regards to inserting records.
the examples i can find for adding and editing only seem to add and update the data, but i want to check the data first and replace any single quotes with dou...
Hi,
It's the first time I use Subsonic.
Let say I have those classes :
public class Store
{
public int Id { get; set; }
public String Name { get; set; }
}
public class Employee
{
public int Id { get; set; }
public String Name { get; set; }
}
An employee is related to a store with is hired date. This means that in th...
How do I execute a SP and get the return value. The below code always returns null object. The storedprocedure has been tested in the database using the same parameters as in code, but the SubSonic sp always returns null. When executed in the db via sql, it returns the correct values.
This is using SubSonic 3.0.0.3.
myDB db = new myDB(...
A weird bug with Subsonic 3.0.0.3
Using - as an example - AdventureWorksLT DB
When I run this code
I get null for gname (although name gets the value ok)
And w is 0 instead of the value in the 1st row
[If I change select new MyData to just select MyData - it works OK]
class Program {
static void Main(string[] args) {
var q = fr...
Hi
I am totaly new to SubSonic, and have never used any other tool like it.
I am not sure if SubSonic would be the right tool, or if there are any other tool that could help. Maybe someone can clarify things for me. :)
The scenario is this:
I have a c# application that fetches data from a set of secured web services, secured through W...
When creating a DomainService, within .NET Ria Services and using Subsonic I can add a IQueryable method as follows:
public IQueryable<Server> GetServers() { return Server.All(); }
It compiles with no problem but when I add a method to get a specific server:
public IQueryable<Server> GetServer(int serverID) { return Server.SingleOrDe...
How to make this select in SubSonic using SqlQuery ?
SELECT * FROM [dbo].[Tablexxx]
Join Tableyyy on Tablexxx.fieldZZZ = Tableyyy.fieldZZZ
WHERE Tablexxx.fieldxxx = 1 AND
(Tablexxx.fieldyyy = 'S' or Tablexxx.fieldyyy = 'T')
Thanks any help.
Valmir
...
I've been playing with SubSonic lately and I've come across an interesting error.
Entity Models.Servers' has a property
'Columns' with an unsupported type
When I created a simple ASP.NET application with VS2008, added the reference to SubSonic, created the connection string, and dragged the Active Record files over into the proje...
I'd like to know if it's necessary to compile linq queries to the subsonic entities?
For example would I'd need to compile the following linq query?
var comments = from a in All()
where a.ParentCommentId == ArticleCommentId
select a;
...
The latest stable release of Mono right now is 2.4.2.3. Does subsonic 3 work with it? I know Mono isn't compatible with all .net 3.5 features yet, but I'm presuming compatibility depends on which specific language features of .net 3.5 Subsonic uses. Does anyone know for a fact whether it's compatible?
...
Note, I have used subsonic 2.2 extensively and love it. This is my first experience with 3.0.
I want to add subsonic to my class library rather than the website. First when I do this, and try and run the custom tool to compile the template files, I get errors saying there is not app.config file. In subsonic 2, I was able to do this and...
Thanks to ranomore I was able to get the Subsonic T4 code generation to work in Visual Web Developer Express for my ASP.Net MVC project, however only using the LinqTemplates.
When I use the ActiveRecord templates with the same settings my project does generate files, but the code doesn't compile anymore...
Any ideas?
...
I've started a C# web application project using subsonic 3.0.3 as my DAL and SQLite for database.
It doesn't have any problem when using SimpleRepo, but the problem occurs when I try to use ActiveRecord/Linq T4 templates.
It says "Metadata file 'System.Data.SQLite' could not be found". The settings.ttinclude is the one provided with SQLi...
I setup a simple select SP to return some rows use the templates to generate the StoredProcedures.cs file and then attempt to call the SP and get a Dataset back;
SubSonic.Schema.StoredProcedure sp = GetSPData(userID);
var data = sp.ExecuteDataSet().Tables[0];
The errror I receive is this:
The SelectCommand property has not been initi...
I meet a problem about: Object of type 'System.Int64' cannot be converted to type 'System.Int32' when run the SubSonic.Examples.SimpleRepo project base on SQLite provider.
I fond that the data type for table Categories's column CategoryID is 'integer', and the 'integer' in SQLite will be return as Int64, in the same time the CategoryID'...
I got a class with [SubSonicIgnore]:
[SubSonicIgnore]
public string Name
{
get
{
return (FirstName ?? string.Empty) + ((MiddleName ?? string.Empty).Length > 0 ? " " + MiddleName + " " : " ") + (SurName ?? string.Empty);
}
}
whenver I run my test:
[Test]
...
I try to using the SQLite in SubSonic.Examples.ActiveRecord project so:
Add a reference for System.Data.SQLite
Copy the SQLite.ttinclude and Settings.ttinclude from \T4 Templates\TemplateProviders\ to the Models_Generated\
Change the <#@ include file="SQLite.ttinclude" #> in the SQLite.ttinclude and Settings.ttinclude
Change the settin...
When loading data with SubSonic (either using ActiveRecord or a collection), only records with IsDeleted set to false will load. How can I show those rows that have been deleted?
For example, deleting an Employee with:
Employee.Delete(1)
Now employee 1 is marked as deleted. Now I want the option to undo the delete and / or show a lis...