Hi There!
I´m newer user in stack overflow and my english i´snt so good i hope you understand my trouble.
when I´m compiling my template this archives .cs it´s ok (Context, Structs), but in the ActiveRecord the code comes incomplete.
It seems that the system Break de compilation at line 5017 and not return any exceptions to me.
my c...
Hi everyone!
i´m a novice in the Subsonic, and i have a isseu about the way how it work´s.
When subsonic generate de .cs file for default the name of the classes comes in LowerCase.
I have edited the MySql template using the funciton "ToTitleCase()" it´s resolved a peace of my problem, if my table name is Products i´ts ok,
but if is t...
Hi Everyone!
i´m using LINQ with the subsonic in a class to get my data here is the code below:
public IQueryable<Veiculo> SelecionaVeiculosSite()
{
return (from v in _db.Veiculos
where v.Ativo == true &&
v.Marca.Ativo == true &&
...
I'm started looking at Subsonic just yesterday and having trouble figuring out how to do even the most basic tasks. I've watched the demos for ActiveRecord and SimpleRepository, but they don't fit what we want so I'm trying to use the Linq Templates.
The getting started guide for Linq walks through enough to do a query, but how do I ...
Hi!
i´m using LINQ with the subsonic in a class to get my data here is the code below:
public IQueryable<Veiculo> SelecionaVeiculosSite()
{
return (from v in _db.Veiculos
where v.Ativo == true &&
v.Marca.Ativo == true &&
v.M...
I'm using Subsonic 3.0.0.3 with ActiveRecord, running against a MySQL database. I'm finding that this works fine:
// Approach 1
var db = new testDB();
db.Insert.Into<company>(c => c.name) .Values("Acme") .Execute();
But this crashes:
// Approach 2
company c = new company();
c.name = "Acme";
c.Save();
The crash is not immediate...
Yet another newbie SubSonic/ActiveRecord question. Suppose I want to insert a couple of records, currently I'm doing this:
using (var scope = new System.Transactions.TransactionScope())
{
// Insert company
company c = new company();
c.name = "ACME";
c.Save();
// Insert some options
company_option o = new compan...
I am working with Subsonic 2 more than 3 years now...
After Linq appears and then Subsonic 3, I start thinking about moving to the new Linq futures that are connected to sql.
I must say that I start move and port my subsonic 2 with SubSonic 3, and very soon I discover that the speed was so slow thats I didn't believe it - and starts al...
i have this MySQL statement from a search page, the user enters there postcode and it finds the nearest stiocklist within 15 MIles of the entered postcode.
SELECT * , (
(
ACOS( SIN( "+SENTLNG +" * PI( ) /180 ) * SIN( s_lat * PI( ) /180 ) + COS( " + SENTLNG +" * PI( ) /180 ) * COS( s_lat * PI( ) /180 ) * COS( (
" + SENTLANG + " - s_ln...
I'm in the process of starting up a web site project. My plan is to roll out the site in a somewhat rudimentary form first and then add to the site functionality along the way.
I'm using Subsonic 3 for my DAL, and I'm expecting the database will go through multiple versions as the sites evolve. This means I'll need some kind of versioni...
Hi there,
I'm new in subsonic3, and I'm getting some errors when I try to use LeftJoin
var q =
from c in categories
join p in products on c equals p.Category into ps
from p in ps.DefaultIfEmpty()
select new { Category = c, ProductName = p == null ? "(No products)" : p.ProductName };
The error is
"System.Collec...
I have an application that's due to be rolled out in May. I just took over the project and dumped EntityFramework 1.0 in favor of SubSonic. (We don't have the time to wait for EF 4.0.)
There is the possibility of moving the application to Azure, and I was wondering what the implications of that might be. My understanding is that EF 4.0 ...
I'm having trouble saving a record in Subsonic 3 using Active record. I've generated my objects using the DALs and tts and everything seems fine because the following test passes. I think that my connection string is correct or the generation wouldn't have succeeded.
[Test]
public void TestSavingAnEmail()
{
...
At one point, SimpleRepository didn't support enums. If you had a POCO object with an Enum it wouldn't persist correctly, you had to have a backing variable which you would use eg:
public enum Color
{
Red = 1,
Blue = 2
}
public class Car
{
[SubSonicIgnore]
public Color CarColor
{
...
Hi!
i´m using subsonic 3 trying convert a SQL2008 project to MySQL.
when the projects try execute this LINQ query :
public IQueryable<Marca> SelecionaMarcas()
{
try
{
return (from mc in _db.Marcas
where mc.Ativo == true
ord...
I am writing a silverlight Line of business application and wanted to use the Subsonic DAL. The Silverlight Project will not allow me to Add the Subsonic reference with the followng error "You can not add the Subsonic.Core.Dll as it was not built against the Silverlight Runtime". I assume that I could create a webservice and add the Su...
I have an application that requires we use distinct user connection strings per user. We are trying to upgrade from SubSonic 2.x to 3.0. I'm running into issues with trying to create a List<> of objects. When I try to create a List like this:
List<table_name> oList = table_name.All().Where(tn => tn.table_id == TableId).ToList();
I ...
I'm tring to increment a field in a MySQL database using SubSonic 3 ActiveRecord. In SQL, this is what I'm after:
UPDATE people SET messages_received=messages_received+1 WHERE people_id=@id_to;
I tried the following, but it didn't seem to work (messages_received always seemed to be 1):
_db.Update<person>()
.Set("messages_receive...
I've been trying to use SubSonic 3.0's test repository support for unit testing but encountered a few issues, so I thought I document them, and the fixes I've come up with:
Auto-Increment Columns Don't Work
Obviously with no DB, auto-increment columns don't work automatically, but if like me you're using simple ints or longs for all id...
[WebMethod]
public string GetAuthToken(string username, string password)
{
var db = new LogicDB();
//var results = from u in db.Users
// where u.Username == username && u.Password == password
// select u;
User u = db.Select
.From<User>()
.W...