{"id":13620030,"url":"https://github.com/gmf520/osharp-v4","last_synced_at":"2025-04-14T19:30:48.240Z","repository":{"id":54780516,"uuid":"42384059","full_name":"gmf520/osharp-v4","owner":"gmf520","description":"osharp framework with .net framework version 4.x","archived":true,"fork":false,"pushed_at":"2023-05-28T02:39:29.000Z","size":6852,"stargazers_count":501,"open_issues_count":3,"forks_count":318,"subscribers_count":101,"default_branch":"master","last_synced_at":"2024-11-08T06:40:15.540Z","etag":null,"topics":["entity-framework","mvc5","osharp"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gmf520.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-09-13T04:46:42.000Z","updated_at":"2024-10-31T07:25:15.000Z","dependencies_parsed_at":"2024-08-01T21:54:03.916Z","dependency_job_id":null,"html_url":"https://github.com/gmf520/osharp-v4","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmf520%2Fosharp-v4","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmf520%2Fosharp-v4/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmf520%2Fosharp-v4/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmf520%2Fosharp-v4/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gmf520","download_url":"https://codeload.github.com/gmf520/osharp-v4/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248945741,"owners_count":21187376,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["entity-framework","mvc5","osharp"],"created_at":"2024-08-01T21:00:51.378Z","updated_at":"2025-04-14T19:30:44.957Z","avatar_url":"https://github.com/gmf520.png","language":"C#","funding_links":[],"categories":["C# #","C\\#"],"sub_categories":[],"readme":"﻿# osharp framework version 3.x\n\n\u003e 此项目基于 `.Net Framework`，已不再维护\n\n\u003e 新项目基于 `.NetStandard2.0`，地址为 https://github.com/i66soft/osharp\n\n - [简介][1]\n - [相关技术][2]\n - [快速启动][3]\n - [开发计划与进度][4]\n - [版本更新日志][5]\n\n## \u003ca id=\"title01\"/\u003e简介\n1. OSharp是个快速开发框架，但不是一个大而全的包罗万象的框架，严格的说，OSharp中什么都没有实现。与其他大而全的框架最大的不同点，就是OSharp只做抽象封装，不做实现。依赖注入、ORM、对象映射、日志、缓存等等功能，都只定义了一套最基础最通用的抽象封装，提供了一套统一的API、约定与规则，并定义了部分执行流程，主要是让项目在一定的规范下进行开发。所有的功能实现端，都是通过现有的成熟的第三方组件来实现的，除了EntityFramework之外，所有的第三方实现都可以轻松的替换成另一种第三方实现，OSharp框架正是要起隔离作用，保证这种变更不会对业务代码造成影响，使用统一的API来进行业务实现，解除与第三方实现的耦合，保持业务代码的规范与稳定。\n2. 相关博客：[OSharp框架解说系列文章](http://www.cnblogs.com/guomingfeng/p/osharp-overall-design.html)\n3. QQ交流群：85895249 [![OSharp开发框架交流群](http://pub.idqqimg.com/wpa/images/group.png)](http://shang.qq.com/wpa/qunwpa?idkey=250897a8ee4c2d3146d798a6111274bfa7bb6306d0f07418bfc6d8c45f26e269 \"OSharp开发框架交流群\")\n\n## \u003ca id=\"title02\"/\u003e相关技术\n1. 技术框架：.NET Framework 4.5\n2. 技术平台：ASP.NET MVC5 + WebAPI5 + SignalR2\n3. 数据存储：EntityFramework 6.1.3\n4. 数据序列化：使用JSON.NET作为JSON序列化的主要工具\n5. 数据映射：定义通用对象映射操作API，并提供基于AutoMapper的实现，主要用于数据传输对象DTO与数据实体模型Model之间的相互转化，免于繁杂的对象属性赋值\n6. IoC组件：参考ASP.NET 5，从框架级别对依赖注入功能进行了抽象与封装，并提供基于Autofac的依赖注入实现\n7. 日志记录：定义通用日志记录接口与基础API，日志输出方式可以使用现成的任意日志组件（如log4net）\n\n## \u003ca id=\"title03\"/\u003e快速启动\n#### 从nuget中引用需要的osharp组件\n#### 在Web.Config中添名为name=\"default\"的数据库连接\n```\n\u003cconnectionStrings\u003e\n    \u003cadd name=\"default\" connectionString=\"Data Source=.; Integrated Security=True; Initial Catalog=OSharp.Default; Pooling=True; MultipleActiveResultSets=True;\" providerName=\"System.Data.SqlClient\" /\u003e\n\u003c/connectionStrings\u003e\n```\n\n#### 在Global的Application_Start方法中添加初始化代码\n```\nIServicesBuilder builder = new ServicesBuilder();\nIServiceCollection services = builder.Build();\nservices.AddDataServices();\nIFrameworkInitializer initializer = new FrameworkInitializer();\ninitializer.Initialize(new MvcAutofacIocBuilder(services));\n```\n\n#### 添加EntityInfo与Function实体类的实体映射配置\n```\npublic class EntityInfoConfiguration : EntityConfigurationBase\u003cEntityInfo, Guid\u003e\n{ }\npublic class FunctionConfiguration : EntityConfigurationBase\u003cFunction, Guid\u003e\n{ }\n```\n\n#### 运行项目，即可初始化完成，将会自动生成相应的数据库\n    \n    \n\n\n  [1]: #title01\n  [2]: #title02\n  [3]: #title03\n  [4]: https://github.com/i66soft/osharp/wiki/plan-rate\n  [5]: https://github.com/i66soft/osharp/wiki/update-logs\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgmf520%2Fosharp-v4","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgmf520%2Fosharp-v4","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgmf520%2Fosharp-v4/lists"}