subsonic

SubSonic2.2 SharedDbConnectionScope and TransactionScope Transaction Confusion

这一生的挚爱 提交于 2019-12-05 23:51:04
ARGH!!! There seems to be a little confusion surrounding the SharedDbConnectionScope and TransactionScope objects to enable wrapping your SubSonic queries within a transaction. The docs suggest specifying the using SharedDbConnectionScope wrapped around the using TransactionScope... using(SharedDbConnectionScope scope = new SharedDbConnectionScope()) { using(TransactionScope ts = new TransactionScope()) { // do something ts.Complete(); } } Then other question here such as Subsonic: Using SharedDbConnectionScope together with TransactionScope seems to be broken suggest the docs are wrong and

Subsonic support for Oracle ODP.NET?

老子叫甜甜 提交于 2019-12-05 22:41:14
I'm new to Subsonic and I work primarily with Oracle databases. Can subsonic be used against an Oracle database and does it support the use of Oracle's ODP.NET data provider. If yes, can you point me to a good example? Thanks in advance. Scott runxc1 Bret Ferrier Marve is a little misleading. Subsonic can be used with Oracle but SubSonic 2.x actually uses System.Data.OracleClient . Subsonic 3.0 does not have any .tt files for Oracle yet as no one has stepped forward to do it. I have been using Subsonic 2.2 with Oracle for months now and find that it works very well. SubSonic does indeed work

Using SubSonic in VB.Net web application

耗尽温柔 提交于 2019-12-05 19:00:41
I am using Subonic in a VB.net application for the first time (I have used it succesfully in a WebSite project plenty of times). I followed the 2nd part of the 'Getting Started' video to actually generate the DAL source files as opposed to the build provider method and everything APPEARS to have gone like expected. However, nothing I do will get my generated namespace to appear. I feel that it has to with the fact that I am running my Web Application in VB.Net and Subsonic generates in C#. Here is the process I followed: 1) I created a blank Web Application Project in Visual Studio 2) I

use subsonic 2.x and 3.x in the same project

余生长醉 提交于 2019-12-05 17:00:37
Is it possible to mix them? I'm asking because I have a big project that uses Subsonic 2.x generated classes (in a compiled dll) but would like to start using 3.x for new stuff. I tried it last night with a project where I had references to both subsonic.dll and subsonic.core.dll but that didn't work with ambiguous references, etc. So removed 2.x and then got an issue with my older compiled subsonic generated classes in that they needed Subsonic 2.1 to run. Hmm... I think there's a small chance that you might be able to do this, but you'd need to use the full qualifying class names (namespace

Parent and Child object in SimpleRepository

三世轮回 提交于 2019-12-05 14:34:34
How would it work in Subsonic's SimpleReporitory if I wanted to be able to have a 1 to many relationship between objects? Would I have to create a bridge object and then build my parent object at runtime, or is this support built in? What I am looking for is the folowing: Adam's Example Shop... Public Class Shop Private m_id As Integer Private m_Name As String Private m_Employees As List(Of Employee) Public Property Id() As Integer Get Return m_id End Get Set(ByVal value As Integer) m_id = value End Set End Property Public Property Name() As String Get Return m_Name End Get Set(ByVal value As

Subsonic - How to use SQL Schema / Owner name as part of the namespace?

回眸只為那壹抹淺笑 提交于 2019-12-05 00:41:55
问题 I've just started using Subsonic 2.2 and so far very impressed - think it'll save me some serious coding time. Before I dive into using it full time though there is something bugging me that I'd like to sort out. In my current database (a SQL2008 db) I have split the tables, views, sps etc. up into separate chunks by schema/owner name, so all the customer tables are in the customer. schema, products in the product. schema etc., so a to select from the customers address table i'd do a select *

Object mapping with LINQ and SubSonic

≯℡__Kan透↙ 提交于 2019-12-04 21:29:47
I'm building a small project with SubSonic 3.0.0.3 ActiveRecord and I'm running into an issue I can't seem to get past. Here is the LINQ query: var result = from r in Release.All() let i = Install.All().Count(x => x.ReleaseId == r.Id) where r.ProductId == productId select new ReleaseInfo { NumberOfInstalls = i, Release = new Release { Id = r.Id, ProductId = r.ProductId, ReleaseNumber = r.ReleaseNumber, RevisionNumber = r.RevisionNumber, ReleaseDate = r.ReleaseDate, ReleasedBy = r.ReleasedBy } }; The ReleaseInfo object is a custom class and looks like this: public class ReleaseInfo { public

Defining SubSonic 3 ActiveRecord migrations

人盡茶涼 提交于 2019-12-04 19:52:56
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 database, regenerating ActiveRecord classes and doing migration as described in http://subsonicproject.com/docs/3.0_Migrations . The old 2.x way of defining migrations doesn't seem to be available any more. Is there a way to drive development from the code rather

What is so great about ORM?

妖精的绣舞 提交于 2019-12-04 19:45:23
问题 So I'm having a head against the wall moment and hoping somebody can come help either remove the wall or stop my head from moving!! Over the last 3/4 weeks I've been investigating ORM's in readyness for a new project. The ORM must map to an existing, large and ageing SQL database. So I tried Subsonic. I really liked v2 and v3 after modding to work nicely with VB and named schemas in SQL was running OK. However, its lack of flexibility of having separate entity properties names vs column names

How Do I Load an Assembly and All of its Dependencies at Runtime in C# for Reflection?

与世无争的帅哥 提交于 2019-12-04 19:36:48
问题 I'm writing a utility for myself, partly as an exercise in learning C# Reflection and partly because I actually want the resulting tool for my own use. What I'm after is basically pointing the application at an assembly and choosing a given class from which to select properties that should be included in an exported HTML form as fields. That form will be then used in my ASP.NET MVC app as the beginning of a View. As I'm using Subsonic objects for the applications where I want to use, this