Project Description

It is a library for developing software using the DI and AOP.
  • . NET Framework 2.0 or more
  • database access object (SQLServer 2000 and later, SQLCe, Oracle)
  • Available in both applications, Windows, the Web(Core is also available in a console application)
  • Can use some features of MS Excel is not the component reference. It is available regardless of the version. If there is also available on the latest backward compatibility to Excel
  • Use log4net to log output
  • Provide each library with NuGet
  • Provide and project templates
  • Provision of entity code generation tool

Nuget Package

Moca.NET can be added to each project using Nuget.
Each package is as follows.

Core Core libraries Moca.NET
Office Office API wrapper library (Only part of Excel)
Oracle Oracle database access helper
SQLCe SQL Server Compact database access helper
SQLCLR Core libraries Moca.NET for SQLCLR
Test Library for MSTest
WebApplication Library for Web applications
Windows Library for Windows application
Web API Library for Web API Controller
Web MVC Library for Web MVC Controller
WebForms Project Moca.NET WebForms Project
WindowsForm Project Moca.NET Windows Form Project

Template and Code Snipets

Summarizes the code when using the usual Moca.NET, I have served as templates and snippets.

Project Templates
(Only supports VB.NET code)
  • Moca.NET Windows Forms application
  • Moca.NET Web application

Template class
  • Dao class template
  • Entity class wizard
  • Web User Control template
  • Web Form template
  • Web Master Page template
  • Web Session interface template
  • Web Cookie interface template
  • Web API Controller template
  • Web Javascript template
  • Web Stylesheet template
  • IMethodInterceptor implements class template
  • SQL statements Interceptor implements class template

(Only supports VB.NET code)
  • DAODelete
  • DAOInsert
  • DAOSelect
  • DAOStoredPrepare
  • DAOStoredSelect
  • DAOStoredUpdate
  • DAOUpdate
  • Log4net
  • ICookie
  • IViewStat

Windows Forms Controls

AlertMessage control of the alert message display
Calendar calendar control
CheckBoxGroup Treated as a group multiple check boxes
DataBinder Component to assist in the binding of item and data input
DebugMarker Debugging mark
MocaDi Controller in order to use the AOP
NullableDateTimePicker Control was extended to handle Null in the standard DateTimePicker
RadioButtonGroup Treated as a group multiple radio buttons
TextBoxEx Control was extended to handle standard TextBox input restrictions, etc.
ToolStripMenuItemGroup Treated as a group a plurality of menu items
WYSIWYGEditor Simple WYSIWYG Editor


Entity Code Generator

used Entity class wizard

It is a tool that generates SQL statements from the Entity class that will be used when using Moca.NET.

supports C# and VB.NET code


output code sample

' <auto-generated>
'     このコードはツールによって生成されました。
'     ランタイム バージョン:4.0.30319.42000
'     このファイルへの変更は、以下の状況下で不正な動作の原因になったり、
'     コードが再生成されるときに損失したりします。
' </auto-generated>

Option Strict Off
Option Explicit On

Imports Moca.Db
Imports Moca.Db.Attr
Imports System.ComponentModel

''' <summary> 
''' TblTestRow エンティティ 
''' </summary> 
''' <remarks></remarks> 
''' <history> 
''' </history> 
Public Class TblTestRow
    Implements System.ComponentModel.INotifyPropertyChanged
    #Region " Declare "
    Private _id As Integer
    Private _note As String
    #End Region
    #Region " Property "
    ''' <summary> 
    ''' Id (Id) Property. 
    ''' </summary> 
    <Column("Id")>  _
    Public Property Id() As Integer
            Return Me._id
        End Get
            Me._id = value
        End Set
    End Property
    ''' <summary> 
    ''' Note (Note) Property. 
    ''' </summary> 
    <Column("Note")>  _
    Public Property Note() As String
            Return Me._note
        End Get
            Me._note = value
        End Set
    End Property
    #End Region
    Public Event PropertyChanged As System.ComponentModel.PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged
    Protected Overridable Sub OnPropertyChanged(ByVal name As String)
        RaiseEvent PropertyChanged(Me, New System.ComponentModel.PropertyChangedEventArgs(name))
    End Sub
End Class

#Region " Definition "
''' <summary> 
''' tbTest エンティティ定義 
''' </summary> 
''' <remarks></remarks> 
''' <history> 
''' </history> 
<Table("app.configのconnectionStringsキーを入れる", "tbTest")>  _
Public Interface ItbTestDefinition
    ''' <summary> 
    ''' Table (Table) Property. 
    ''' </summary> 
    Property Table() As Moca.Db.DbInfoTable
    ''' <summary> 
    ''' Id (Id) Property. 
    ''' </summary> 
    <Column("Id")>  _
    Property Id() As Moca.Db.DbInfoColumn
    ''' <summary> 
    ''' Note (Note) Property. 
    ''' </summary> 
    <Column("Note")>  _
    Property Note() As Moca.Db.DbInfoColumn
End Interface
#End Region

Last edited Oct 25 at 11:51 AM by MiYABiS, version 23