Kairyu 0.2 alpha

Rating: No reviews yet
Downloads: 10
Change Set: 111459d43b9a
Released: Feb 3, 2013
Updated: Feb 3, 2013 by mk3008
Dev status: Alpha Help Icon

Downloads

Source Code Kairyu 0.2 alpha
source code, 287K, uploaded Feb 3, 2013 - 10 downloads

Release Notes

対応DBMS

SQLServerCe3.5
SQLServer2008R2 NEW

検索関数の書式変更

LINQを使用して記述できるように変更。
単純な検索の場合、記述量が増えてしまいますが、旧バージョンでは表現が難しかった検索条件が記述可能になりました。

例:全件取得

バージョン0.1(VB.NET)
Dim lst As List(Of Prefecture) = Nothing
ModelFactory.Load(Sub(r) lst = r.Load(Of Prefecture)())
バージョン0.2(VB.NET) NEW
Dim lst As List(Of Prefecture) = Nothing
ModelFactory.Load(Sub(r) lst = r.From(Of Prefecture).ToList)

例:LIKE文検索

バージョン0.1(VB.NET)
Dim lst As List(Of Prefecture) = Nothing
Dim fn As Func(Of LoadDefinition, LoadDefinition) =
    Function(def)
        Dim w As New Prefecture With {.PrefectureHiragana = "%県"}
        Dim kv As KeyValuePair(Of String, Object) = w.GetKeyValue(Function(el) el.PrefectureHiragana)
        def.Where = WhereFactory.AndWhereMerge(def, WhereFactory.CreateWhereColumn(def, "{0} LIKE {1}{2}", kv, True))
        Return def
    End Function
ModelFactory.Load(Sub(r) lst = r.Load(Of Prefecture)(defOverrider:=fn))
バージョン0.2(VB.NET) NEW
Dim lst As List(Of Prefecture) = Nothing
ModelFactory.Load(Sub(r) lst = r.From(Of Prefecture).WhereLike(Function(x) x.PrefectureName, "%県").ToList)

Reviews for this release

No reviews yet for this release.