JFramework.Core
1.0.2
See the version list below for details.
dotnet add package JFramework.Core --version 1.0.2
NuGet\Install-Package JFramework.Core -Version 1.0.2
<PackageReference Include="JFramework.Core" Version="1.0.2" />
paket add JFramework.Core --version 1.0.2
#r "nuget: JFramework.Core, 1.0.2"
// Install JFramework.Core as a Cake Addin
#addin nuget:?package=JFramework.Core&version=1.0.2
// Install JFramework.Core as a Cake Tool
#tool nuget:?package=JFramework.Core&version=1.0.2
JFramework
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net is compatible. |
-
- log4net (>= 2.0.3)
- ServiceStack.Redis (>= 4.0.42)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on JFramework.Core:
Package | Downloads |
---|---|
JFramework.Data.MySql
JFramework |
GitHub repositories
This package is not used by any popular GitHub repositories.
1、Install Package
Install-Package log4net
Install-Package ServiceStack.Redis
2、Create Files
create log4net.config, u can edit the file content if u need, but note that built-in logger name is JFramework.Core and OtherLog
3、Add Config
<ProjectType>.config Add:
<!--[log4net Add]-->
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
</configSections>
<!--[database Add]-->
<connectionStrings>
<add name="Default" connectionString="server=<databaseServer>;database=<databaseName>;uid=<uid>;pwd=<pwd>;port=<port>;character set=utf8;" providerName="MySql.Data.MySqlClient"/>
</connectionStrings>
Now ,u can do work.
the entity class inherit JFramework.Core.Data.EntityObject
-class add attribute Table
-property add attribute Column
like this
[Table("MyData_District")]
public class District : EntityObject
{
private int _DistrictCode;
private string _DistrictName;
[Column(IsPrimaryKey = true, IsNull = false, Name = "Code")]
public int DistrictCode
{
get { return _DistrictCode; }
set { this.ReportPropertyChanged("DistrictCode"); }
}
[Column(IsPrimaryKey = true, IsNull = false, Name = "Name")]
public string DistrictName
{
get { return _DistrictName; }
set { this.ReportPropertyChanged("DistrictName"); }
}
}
the rule class inherit JFramework.Core.Data.RuleObject
the BLL call <SomeRule>.Instance.<SomeMethod>
How to using log4net record log?
applaction startup add:
log4net.Config.XmlConfigurator.ConfigureAndWatch(new System.IO.FileInfo(Server.MapPath("Log4Net.config")));