自己使用的一个.NET轻量开发结构

8/3/2015来源:C#应用人气:845

自己使用的一个.NET轻量开发结构

三个文件夹,第一个是放置前端部分,第二个是各种支持的类文件,第三个是单元测试文件。

Core文件类库

放置的是与数据库做交互的文件,以及一些第三方类库,还有与数据库连接的文件

1.Lasy.Validator是一个基于Attribute验证器,我觉得这种验证方式在挺便捷的,具体可以在这里查看到http://www.cnblogs.com/over140/archive/2009/07/04/1515892.html2.ToJson是一个将数据转换成json格式的字符串的一个类库,很便捷3.NPinyin是一个将中文转换成拼音的一个类别

app.config是一个连接数据库的配置文件,两个数据库一个是测试用的,一个是调试用的

<?xml version="1.0" encoding="utf-8" ?><configuration>    <configSections>    </configSections>    <connectionStrings>        <add name="QuyouCore.PRoperties.Settings.ClubConnectionString"            connectionString="Data Source=192.168.1.214;Initial Catalog=Club;User ID=sa;PassWord=123456"            providerName="System.Data.SqlClient" />        <add name="QuyouCore.Properties.Settings.ClubTestConnectionString"            connectionString="Data Source=192.168.1.214;Initial Catalog=Club_Test;User ID=sa;Password=123456" />    </connectionStrings></configuration>

点击core文件夹进入数据库操作

ipgoglIoIoiooiVgQVUKqgNOm9dxZYYHcpy/Z65/tjXu+37C7sLhJjEubZh4d775lz5p7zu3PanBlCURRFUfCCBAKhUqkEgNTU1NOnTwMARVFSqVQmk8nlcrykKIqilCp/lBRFSRUSoICSg1wMEgkoQKYAAR/qRSCuFHEEAHwAIQAfQEopKEpBtdF/lQAgMjKS4AViSyaTAYBEIsF/pFKpUqmkU+NfmUymNTuJUsEViGvYdQIeVyjk1dVXC2QcADlQUrlMCCBTygUSUT3IRQQFRNGGvP8wNUIeRVEKhQLVHuo8BoPx8OFDvCOXy5VKpUQiwUc0HNWyi419eM/rgLfnbp97R7w8HBKeBgoahCBV/k+dyilQgkwsk8uVaoyq9DLv02LeNnqV1Ah5crkclVlGRkZCQkJERERqampKSkpMTExiYmJsbKxQKJTL5agOtWZGieVXz++rrbwLisfAfwiiR0mBWwOCgvLyGZkZKZnpz5OS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