hiya
Not a question but i dont have a blog and i have just created a new subsonic TT file
that will generate the Metadata classes automatically for the subsonic classes so you can
skip out some work when using dataAnnotation and CreateForModel etc
so the first step is to amend your ActiveRecord.TT with the following
using System.Com...
I've searched a lot and I haven't really found an answer.
Is it possible to use POCOs with Subsonic?
How do I map tables (which do not look like the POCOs) to my classes?
...
I'm evaluating SubSonic 3.0 for use in our business as a replacement for our POCO objects. I'm new to SubSonic, literally installing it yesterday. I've gotten to the point where I can connect to one database using the 3.0 LINQ T4 Templates, and have been wooed by the promise of being able to connect to multiple databases in one applica...
I'm using the SubSonic scaffold control with auto-generating many to many controls.
<subsonic:Scaffold ID="scfMain" runat="server"
AutoGenerateManyToMany="true"></subsonic:Scaffold>
On Page_Load I'm setting the table name
scfMain.TableName = "Foo";
The many to many controls are generated by a many to many table, two foreign key...
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...
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...
Hi All,
I would like to know if its possible to order by a specific ID in subsonic 2.1.
Same as regular sql query:
ORDER BY
CASE
WHEN ID = 5 then 1
WHEN ID = 10 then 2
WHEN ID = 1 then 3
WHEN ID = then 4
else 5
END
I hope someone can help me, I want this functionality for country specific content.
Kind regards,
Mark
...
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...
Hi,
Background - I need a framework/approach to managed database updates for a .NET Winforms app being deployed on users PC's via clickonce deploy. The app uses a sqlite database.
Q1. What mechanism does Subsonic use to run such migrations on the local PC? e.g. would it be MSBuild
Q2. If it does need a tool like how can my applicat...
Traditionally when using a DbCommand when retrieving data from a sproc, something like the following is good practice:
DbCommand cmdDbCommand...
dbGetData = DatabaseFactory.CreateDatabase("MyDatabase");
cmdDbCommand = dbGetData.GetStoredProcCommand("MySproc");
.
.
.
try
{
...
}
catch (System.Exception ex)
{
if (cmdDbCommandcmdDbComm...
Hi All,
I have successfully implemented SUBSONIC DAL in my desktop application. it was superb experience. but subsonic reads database password from app.config file. as app.config deploy with application on client side, therefore its a big security threat.
It would be helpful if i can read database password from a variable instead of ap...
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've got this toy code, works fine, using MySQL
var r = new SimpleRepository("DB", SimpleRepositoryOptions.None);
var q = r.Find<User>(x => x.UserName == "testuser");
How do I view the SQL generated by that query ?
...
I'm looking for information on how to use MySQL geometry types in .NET. I'm using Sub-sonic for ORM, and don't really need to support much more than MySQL's POINT type.
The MySQL .NET connector seems to return point data as a byte[] array in OpenGIS WKB format.
What libraries are recommended for working with this WKB format?
Alte...
I'm not having any luck finding where in my code I should run migrations when I start up my application. Obviously this should only happen once, when the app starts.
In Global.asax.cs I tried:
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
RegisterRoutes(RouteTable.Routes);
var repository = new...
I was recently reading Rob Conery's post about DB4O and it was very interesting. My question is really concerned with class generation and future use of Subsonic and DB4O.
As Subsonic looks at the database and then generates classes how would this work for DB4O. Would the classes have to be written by hand and then DB4O would store th...
I have a boolean (BOOL) type field in the SQLite table.
In the SubSonic generated DAL it is represented as string (instead of bool).
It is weird.
How it can be managed? Please, help.
...