simplerepository

Subsonic - can anyone provide an example of using Subsonic SimpleRepository to persist a list/array of objects?

梦想的初衷 提交于 2019-12-19 12:01:50
问题 I'm looking for possible ways to persist the following classes. Subsonic SimpleRepository looks like it might work, and people have said it should, when I asked a more general question. But I've been unable to find a single example of how to do this - or at least one I could understand. Can anyone point me to an example, or tell me how I could use Subsonic to map the following classes to a database? Note that I haven't designed the database - I'm hoping Subsonic will do that for me , lazy sod

Parent and Child object in SimpleRepository

混江龙づ霸主 提交于 2019-12-14 03:43:52
问题 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 =

Subsonic 3, SimpleRepository, SQL Server: How to find rows with a null field?

假如想象 提交于 2019-12-10 17:46:09
问题 How ca I use Subsonic's Find<T> method to search for rows with a field containing the "null" value. For the sake of the discussion, let's assume I have a c# class called "Visit" which contains a nullable DateTime field called "SynchronizedOn" and also let's assume that the Subsonic migration has created the corresponding "Visits" table and the "SynchronizedOn" field. If I was to write the SQL query myself, I would write something like: SELECT * FROM Visits WHERE SynchronizedOn IS NULL When I

SubSonic generated DB Schema, binary types?

强颜欢笑 提交于 2019-12-08 08:54:23
问题 How do you create binary columns in the DB using SubSonic's Schema builder? So tonight I decided to dive into SubSonic. I see a lot of questions on here and great responses by Rob and many others. I see that SubSonic is an ORM, with the T4 Templates it can generate some very nice and efficient classes from an existing database. But, I want to go the other way. I have a very rich Domain, and want to create my tables adhoc from my Domain using SubSonic and the RunMigrations option. All works

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