diff --git a/CC.Yi.API/CC.Yi.API.csproj b/CC.Yi.API/CC.Yi.API.csproj new file mode 100644 index 00000000..4e2559a2 --- /dev/null +++ b/CC.Yi.API/CC.Yi.API.csproj @@ -0,0 +1,22 @@ + + + + net5.0 + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + diff --git a/CC.Yi.API/Controllers/WeatherForecastController.cs b/CC.Yi.API/Controllers/WeatherForecastController.cs new file mode 100644 index 00000000..6ba2ecff --- /dev/null +++ b/CC.Yi.API/Controllers/WeatherForecastController.cs @@ -0,0 +1,47 @@ +using CC.Yi.IBLL; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Logging; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace CC.Yi.API.Controllers +{ + [ApiController] + [Route("[controller]/[action]")] + public class WeatherForecastController : ControllerBase + { + private static readonly string[] Summaries = new[] + { + "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" + }; + + private readonly ILogger _logger; + private IstudentBll _studentBll; + public WeatherForecastController(ILogger logger, IstudentBll studentBll) + { + _studentBll = studentBll; + _logger = logger; + } + + [HttpGet] + public IEnumerable Get() + { + var rng = new Random(); + return Enumerable.Range(1, 5).Select(index => new WeatherForecast + { + Date = DateTime.Now.AddDays(index), + TemperatureC = rng.Next(-20, 55), + Summary = Summaries[rng.Next(Summaries.Length)] + }) + .ToArray(); + } + [HttpGet] + public IActionResult Test() + { + var data= _studentBll.GetEntities(n => n.id >= 0).ToList(); + return Content(Common.JsonFactory.JsonToString(data)); + } + } +} diff --git a/CC.Yi.API/Migrations/20210319112041_yi1.Designer.cs b/CC.Yi.API/Migrations/20210319112041_yi1.Designer.cs new file mode 100644 index 00000000..fa669c28 --- /dev/null +++ b/CC.Yi.API/Migrations/20210319112041_yi1.Designer.cs @@ -0,0 +1,40 @@ +// +using CC.Yi.Model; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +namespace CC.Yi.API.Migrations +{ + [DbContext(typeof(DataContext))] + [Migration("20210319112041_yi1")] + partial class yi1 + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("Relational:MaxIdentifierLength", 128) + .HasAnnotation("ProductVersion", "5.0.4") + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + modelBuilder.Entity("CC.Yi.Model.student", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + b.Property("name") + .HasColumnType("int"); + + b.HasKey("id"); + + b.ToTable("student"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/CC.Yi.API/Migrations/20210319112041_yi1.cs b/CC.Yi.API/Migrations/20210319112041_yi1.cs new file mode 100644 index 00000000..03299091 --- /dev/null +++ b/CC.Yi.API/Migrations/20210319112041_yi1.cs @@ -0,0 +1,29 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +namespace CC.Yi.API.Migrations +{ + public partial class yi1 : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "student", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + name = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_student", x => x.id); + }); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "student"); + } + } +} diff --git a/CC.Yi.API/Migrations/DataContextModelSnapshot.cs b/CC.Yi.API/Migrations/DataContextModelSnapshot.cs new file mode 100644 index 00000000..d2ae13a7 --- /dev/null +++ b/CC.Yi.API/Migrations/DataContextModelSnapshot.cs @@ -0,0 +1,38 @@ +// +using CC.Yi.Model; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +namespace CC.Yi.API.Migrations +{ + [DbContext(typeof(DataContext))] + partial class DataContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("Relational:MaxIdentifierLength", 128) + .HasAnnotation("ProductVersion", "5.0.4") + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + modelBuilder.Entity("CC.Yi.Model.student", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + b.Property("name") + .HasColumnType("int"); + + b.HasKey("id"); + + b.ToTable("student"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/CC.Yi.API/Program.cs b/CC.Yi.API/Program.cs new file mode 100644 index 00000000..5457af7a --- /dev/null +++ b/CC.Yi.API/Program.cs @@ -0,0 +1,26 @@ +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace CC.Yi.API +{ + public class Program + { + public static void Main(string[] args) + { + CreateHostBuilder(args).Build().Run(); + } + + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureWebHostDefaults(webBuilder => + { + webBuilder.UseStartup(); + }); + } +} diff --git a/CC.Yi.API/Properties/launchSettings.json b/CC.Yi.API/Properties/launchSettings.json new file mode 100644 index 00000000..9942be97 --- /dev/null +++ b/CC.Yi.API/Properties/launchSettings.json @@ -0,0 +1,31 @@ +{ + "$schema": "http://json.schemastore.org/launchsettings.json", + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:55197", + "sslPort": 44334 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "launchUrl": "swagger", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "CC.Yi.API": { + "commandName": "Project", + "dotnetRunMessages": "true", + "launchBrowser": true, + "launchUrl": "swagger", + "applicationUrl": "https://localhost:5001;http://localhost:5000", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/CC.Yi.API/Startup.cs b/CC.Yi.API/Startup.cs new file mode 100644 index 00000000..fe9446c4 --- /dev/null +++ b/CC.Yi.API/Startup.cs @@ -0,0 +1,74 @@ + +using CC.Yi.BLL; +using CC.Yi.DAL; +using CC.Yi.IBLL; +using CC.Yi.IDAL; +using CC.Yi.Model; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.HttpsPolicy; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; +using Microsoft.OpenApi.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace CC.Yi.API +{ + public partial class Startup + { + public Startup(IConfiguration configuration) + { + Configuration = configuration; + } + + public IConfiguration Configuration { get; } + + // This method gets called by the runtime. Use this method to add services to the container. + public void ConfigureServices(IServiceCollection services) + { + + services.AddControllers(); + services.AddSwaggerGen(c => + { + c.SwaggerDoc("v1", new OpenApiInfo { Title = "CC.Yi.API", Version = "v1" }); + }); + string connection = Configuration["ConnectionStringBySQL"]; + string connection2 = Configuration["ConnectionStringByMySQL"]; + services.AddDbContext(options => + { + options.UseSqlServer(connection, b => b.MigrationsAssembly("CC.Yi.API"));//ݿ + }); + services.AddScoped(typeof(IBaseDal<>), typeof(BaseDal<>)); + services.AddScoped(typeof(IstudentBll), typeof(studentBll)); + } + + // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. + public void Configure(IApplicationBuilder app, IWebHostEnvironment env) + { + if (env.IsDevelopment()) + { + app.UseDeveloperExceptionPage(); + app.UseSwagger(); + app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "CC.Yi.API v1")); + } + + app.UseHttpsRedirection(); + + app.UseRouting(); + + app.UseAuthorization(); + + app.UseEndpoints(endpoints => + { + endpoints.MapControllers(); + }); + } + } +} diff --git a/CC.Yi.API/WeatherForecast.cs b/CC.Yi.API/WeatherForecast.cs new file mode 100644 index 00000000..9a3c14cf --- /dev/null +++ b/CC.Yi.API/WeatherForecast.cs @@ -0,0 +1,15 @@ +using System; + +namespace CC.Yi.API +{ + public class WeatherForecast + { + public DateTime Date { get; set; } + + public int TemperatureC { get; set; } + + public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); + + public string Summary { get; set; } + } +} diff --git a/CC.Yi.API/appsettings.Development.json b/CC.Yi.API/appsettings.Development.json new file mode 100644 index 00000000..8983e0fc --- /dev/null +++ b/CC.Yi.API/appsettings.Development.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + } +} diff --git a/CC.Yi.API/appsettings.json b/CC.Yi.API/appsettings.json new file mode 100644 index 00000000..8fcd04df --- /dev/null +++ b/CC.Yi.API/appsettings.json @@ -0,0 +1,12 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + }, + "AllowedHosts": "*", + "ConnectionStringBySQL": "server=.;Database=cctest;UId=sa;PWD=Qz52013142020.", + "ConnectionStringByMySQL": "Data Source=49.235.212.122;Database=GraduationProject;User ID=root;Password=Qz52013142020.;pooling=true;port=3306;sslmode=none;CharSet=utf8;" +} diff --git a/CC.Yi.BLL/BaseBll.cs b/CC.Yi.BLL/BaseBll.cs new file mode 100644 index 00000000..6ebbd6f4 --- /dev/null +++ b/CC.Yi.BLL/BaseBll.cs @@ -0,0 +1,87 @@ +using CC.Yi.DALFactory; +using CC.Yi.IBLL; +using CC.Yi.IDAL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Expressions; + +namespace CC.Yi.BLL +{ + public class BaseBll : IBaseBll where T : class, new() + { + public IBaseDal CurrentDal; + public BaseBll(IBaseDal cd) + { + CurrentDal = cd; + } + //public abstract void SetCurrentDal(); + //public BaseBll()//基类的构造方法 + //{ + // SetCurrentDal();//该方法由子类去实现 + //} + + public IQueryable GetEntities(Expression> whereLambda) + { + return CurrentDal.GetEntities(whereLambda); + } + + public int GetCount(Expression> whereLambda) //统计数量 + { + return CurrentDal.GetCount(whereLambda); + } + + public IQueryable> GetGroup(Expression> whereLambda, Expression> groupByLambda) //分组 + { + return CurrentDal.GetGroup(whereLambda, groupByLambda); + + } + + + public IQueryable GetPageEntities(int pageSize, int pageIndex, out int total, Expression> whereLambda, Expression> orderByLambda, bool isAsc) + { + return CurrentDal.GetPageEntities(pageSize, pageIndex, out total, whereLambda, orderByLambda, isAsc); + } + + public T Add(T entity) + { + CurrentDal.Add(entity); + DbSession.SaveChanges(); + return entity; + } + + public bool Update(T entity) + { + CurrentDal.Update(entity); + return DbSession.SaveChanges() > 0; + } + + public bool Delete(T entity) + { + CurrentDal.Delete(entity); + return DbSession.SaveChanges() > 0; + } + public IDbSession DbSession + { + get + { + return DbSessionFactory.GetCurrentDbSession(); + } + } + public bool Delete(int id) + { + CurrentDal.Detete(id); + return DbSession.SaveChanges() > 0; + } + + public int DeleteList(List ids) + { + foreach (var id in ids) + { + CurrentDal.Detete(id); + } + return DbSession.SaveChanges();//这里把SaveChanges方法提到了循环体外,自然就与数据库交互一次 + } + + } +} diff --git a/CC.Yi.BLL/CC.Yi.BLL.csproj b/CC.Yi.BLL/CC.Yi.BLL.csproj new file mode 100644 index 00000000..ce6c0299 --- /dev/null +++ b/CC.Yi.BLL/CC.Yi.BLL.csproj @@ -0,0 +1,32 @@ + + + + netcoreapp3.1 + + + + + + + + + + + TextTemplatingFileGenerator + T4BLL.cs + + + + + + + + + + True + True + T4BLL.tt + + + + diff --git a/CC.Yi.BLL/T4BLL.cs b/CC.Yi.BLL/T4BLL.cs new file mode 100644 index 00000000..da68edd2 --- /dev/null +++ b/CC.Yi.BLL/T4BLL.cs @@ -0,0 +1,19 @@ + +using CC.Yi.IBLL; +using CC.Yi.IDAL; +using CC.Yi.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace CC.Yi.BLL +{ + public partial class studentBll : BaseBll, IstudentBll + { + public studentBll(IBaseDal cd):base(cd) + { + CurrentDal = cd; + } + } +} \ No newline at end of file diff --git a/CC.Yi.BLL/T4BLL.tt b/CC.Yi.BLL/T4BLL.tt new file mode 100644 index 00000000..dcda0135 --- /dev/null +++ b/CC.Yi.BLL/T4BLL.tt @@ -0,0 +1,37 @@ +<#@ template debug="false" hostspecific="true" language="C#" #> +<#@ assembly name="System.Core" #> +<#@ import namespace="System.Linq" #> +<#@ import namespace="System.Text" #> +<#@ import namespace="System.Collections.Generic" #> +<#@ import namespace="System.IO" #> +<#@ output extension=".cs" #> +<# + string solutionsPath = Host.ResolveAssemblyReference("$(SolutionDir)");//获取解决方案路径 + string txt; + StreamReader sr = new StreamReader(solutionsPath+@"\T4Model\T4Model.txt"); + txt=sr.ReadToEnd(); + sr.Close(); + string[] ModelData= txt.Split(','); + #> + +using CC.Yi.IBLL; +using CC.Yi.IDAL; +using CC.Yi.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace CC.Yi.BLL +{ +<# foreach(string k in ModelData){ + #> + public partial class <#=k #>Bll : BaseBll<<#=k #>>, I<#=k #>Bll + { + public <#=k #>Bll(IBaseDal<<#=k #>> cd):base(cd) + { + CurrentDal = cd; + } + } +<# } #> +} \ No newline at end of file diff --git a/CC.Yi.Common/CC.Yi.Common.csproj b/CC.Yi.Common/CC.Yi.Common.csproj new file mode 100644 index 00000000..a20524d3 --- /dev/null +++ b/CC.Yi.Common/CC.Yi.Common.csproj @@ -0,0 +1,11 @@ + + + + netcoreapp3.1 + + + + + + + diff --git a/CC.Yi.Common/JsonFactory.cs b/CC.Yi.Common/JsonFactory.cs new file mode 100644 index 00000000..f51b56c4 --- /dev/null +++ b/CC.Yi.Common/JsonFactory.cs @@ -0,0 +1,12 @@ +using System; + +namespace CC.Yi.Common +{ + public static class JsonFactory + { + public static string JsonToString(object q) + { + return Newtonsoft.Json.JsonConvert.SerializeObject(q); + } + } +} diff --git a/CC.Yi.DAL/BaseDal.cs b/CC.Yi.DAL/BaseDal.cs new file mode 100644 index 00000000..fc85f109 --- /dev/null +++ b/CC.Yi.DAL/BaseDal.cs @@ -0,0 +1,86 @@ +using CC.Yi.IDAL; +using CC.Yi.Model; +using Microsoft.EntityFrameworkCore; +using System; +using System.Linq; +using System.Linq.Expressions; + +namespace CC.Yi.DAL +{ + public class BaseDal : IBaseDal where T : class, new() + { + public DataContext Db; + public BaseDal(DataContext _Db) + { + Db = _Db; + } + public IQueryable GetEntities(Expression> whereLambda) + { + return Db.Set().Where(whereLambda).AsQueryable(); + } + + public int GetCount(Expression> whereLambda) //统计数量 + { + return Db.Set().Where(whereLambda).Count(); + } + + public IQueryable> GetGroup(Expression> whereLambda, Expression> groupByLambda) //分组 + { + return Db.Set().Where(whereLambda).GroupBy(groupByLambda).AsQueryable(); + + } + + + + public IQueryable GetPageEntities(int pageSize, int pageIndex, out int total, Expression> whereLambda, Expression> orderByLambda, bool isAsc) + { + total = Db.Set().Where(whereLambda).Count(); + if (isAsc) + { + var pageData = Db.Set().Where(whereLambda) + .OrderBy(orderByLambda) + .Skip(pageSize * (pageIndex - 1)) + .Take(pageSize).AsQueryable(); + return pageData; + } + else + { + var pageData = Db.Set().Where(whereLambda) + .OrderByDescending(orderByLambda) + .Skip(pageSize * (pageIndex - 1)) + .Take(pageSize).AsQueryable(); + return pageData; + } + } + + public T Add(T entity) + { + Db.Set().Add(entity); + //Db.SaveChanges(); + return entity; + } + + public bool Update(T entity) + { + //所有字段均修改 + Db.Entry(entity).State = EntityState.Modified; + //return Db.SaveChanges() > 0; + return true; + } + + + public bool Delete(T entity) + { + Db.Entry(entity).State = EntityState.Deleted; + //return Db.SaveChanges() > 0; + return true; + } + public bool Detete(int id) + { + var entity = Db.Set().Find(id);//根据id找到实体 + Db.Set().Remove(entity);//由于这里先Find找到了实体,所以这里可以用Remove标记该实体要移除(删除)。如果不是先Find到实体就需要用System.Data.Entity.EntityState.Deleted + return true; + } + + } +} diff --git a/CC.Yi.DAL/CC.Yi.DAL.csproj b/CC.Yi.DAL/CC.Yi.DAL.csproj new file mode 100644 index 00000000..ac766382 --- /dev/null +++ b/CC.Yi.DAL/CC.Yi.DAL.csproj @@ -0,0 +1,31 @@ + + + + netcoreapp3.1 + + + + + + + + + + TextTemplatingFileGenerator + T4DAL.cs + + + + + + + + + + True + True + T4DAL.tt + + + + diff --git a/CC.Yi.DAL/DbContentFactory.cs b/CC.Yi.DAL/DbContentFactory.cs new file mode 100644 index 00000000..a89b3cb8 --- /dev/null +++ b/CC.Yi.DAL/DbContentFactory.cs @@ -0,0 +1,50 @@ +using CC.Yi.Model; +using Microsoft.EntityFrameworkCore; +using System.Collections.Concurrent; +using System.Threading; + + +namespace CC.Yi.DAL +{ + public class DbContentFactory + { + private static DataContext Webcontext; + + public DbContentFactory(DataContext webContext) + { + Webcontext = webContext; + } + + //public static void Initialize(DataContext webContext) + //{ + // Webcontext = webContext; + //} + public static DataContext GetCurrentDbContent() + { + ////return new DataModelContainer(); + ////一次请求共用一个上下文实例 + ////每一次http请求都会开启一个新的线程,保证在一个线程中,DbContext是唯一的 + ////CallContext:是线程内部唯一的数据槽(一块内存空间/容器),相当于一个键值对数据容器,通过key获取value了,需要引入System.Runtime.Remoting.Messaging;命名空间 + //DbContext db = CallContext.GetData("DbContext") as DbContext; + ////从 CallContext 中检索具有指定key“DbContext”的对象,并强转为DbContext + //if (db == null)//线程在数据槽里面没有此上下文 + //{ + // db = Webcontext; + // CallContext.SetData("DbContext", db);//放到数据槽中去,DbContext是key,db是value + //} + //return db; + return Webcontext; + } + + //private static class CallContext + //{ + // static ConcurrentDictionary> state = new ConcurrentDictionary>(); + + // public static void SetData(string name, object data) => + // state.GetOrAdd(name, _ => new AsyncLocal()).Value = data; + + // public static object GetData(string name) => + // state.TryGetValue(name, out AsyncLocal data) ? data.Value : null; + //} + } +} diff --git a/CC.Yi.DAL/T4DAL.cs b/CC.Yi.DAL/T4DAL.cs new file mode 100644 index 00000000..e4656a91 --- /dev/null +++ b/CC.Yi.DAL/T4DAL.cs @@ -0,0 +1,15 @@ +using CC.Yi.IDAL; +using CC.Yi.Model; +using System; +using System.Collections.Generic; +using System.Text; + +namespace CC.Yi.DAL +{ + public partial class studentDal : BaseDal, IstudentDal + { + public studentDal(DataContext _Db) : base(_Db) + { + } + } +} \ No newline at end of file diff --git a/CC.Yi.DAL/T4DAL.tt b/CC.Yi.DAL/T4DAL.tt new file mode 100644 index 00000000..bd65067b --- /dev/null +++ b/CC.Yi.DAL/T4DAL.tt @@ -0,0 +1,33 @@ +<#@ template debug="false" hostspecific="true" language="C#" #> +<#@ assembly name="System.Core" #> +<#@ import namespace="System.Linq" #> +<#@ import namespace="System.Text" #> +<#@ import namespace="System.Collections.Generic" #> +<#@ import namespace="System.IO" #> +<#@ output extension=".cs" #> +<# + string solutionsPath = Host.ResolveAssemblyReference("$(SolutionDir)");//获取解决方案路径 + string txt; + StreamReader sr = new StreamReader(solutionsPath+@"\T4Model\T4Model.txt"); + txt=sr.ReadToEnd(); + sr.Close(); + string[] ModelData= txt.Split(','); + #> +using CC.Yi.IDAL; +using CC.Yi.Model; +using System; +using System.Collections.Generic; +using System.Text; + +namespace CC.Yi.DAL +{ +<# foreach(string k in ModelData){ + #> + public partial class <#=k #>Dal : BaseDal<<#=k #>>, I<#=k #>Dal + { + public <#=k #>Dal(DataContext _Db) : base(_Db) + { + } + } +<# } #> +} \ No newline at end of file diff --git a/CC.Yi.DALFactory/CC.Yi.DALFactory.csproj b/CC.Yi.DALFactory/CC.Yi.DALFactory.csproj new file mode 100644 index 00000000..7019acb0 --- /dev/null +++ b/CC.Yi.DALFactory/CC.Yi.DALFactory.csproj @@ -0,0 +1,40 @@ + + + + netcoreapp3.1 + + + + + + + + + + + + + + True + True + T4DbSession.tt + + + True + True + T4StaticDalFactory.tt + + + + + + TextTemplatingFileGenerator + T4DbSession.cs + + + TextTemplatingFileGenerator + T4StaticDalFactory.cs + + + + diff --git a/CC.Yi.DALFactory/DbSession.cs b/CC.Yi.DALFactory/DbSession.cs new file mode 100644 index 00000000..71b38475 --- /dev/null +++ b/CC.Yi.DALFactory/DbSession.cs @@ -0,0 +1,21 @@ +using CC.Yi.DAL; +using CC.Yi.IDAL; +using CC.Yi.Model; +using Microsoft.EntityFrameworkCore; +using System; + +namespace CC.Yi.DALFactory +{ + public partial class DbSession : IDbSession + { + public int SaveChanges() + { + return DbContentFactory.GetCurrentDbContent().SaveChanges(); + } + public DataContext GetDbContent() + { + return DbContentFactory.GetCurrentDbContent(); + } + + } +} diff --git a/CC.Yi.DALFactory/DbSessionFactory.cs b/CC.Yi.DALFactory/DbSessionFactory.cs new file mode 100644 index 00000000..afa24d06 --- /dev/null +++ b/CC.Yi.DALFactory/DbSessionFactory.cs @@ -0,0 +1,35 @@ +using CC.Yi.IDAL; +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; + +namespace CC.Yi.DALFactory +{ + public class DbSessionFactory + { + public static IDbSession GetCurrentDbSession() + { + IDbSession db = CallContext.GetData("DbSession") as IDbSession; + if (db == null) + { + db = new DbSession(); + CallContext.SetData("DbSession", db); + } + return db; + } + + private static class CallContext + { + static ConcurrentDictionary> state = new ConcurrentDictionary>(); + + public static void SetData(string name, object data) => + state.GetOrAdd(name, _ => new AsyncLocal()).Value = data; + + public static object GetData(string name) => + state.TryGetValue(name, out AsyncLocal data) ? data.Value : null; + } + } +} diff --git a/CC.Yi.DALFactory/StaticDalFactory.cs b/CC.Yi.DALFactory/StaticDalFactory.cs new file mode 100644 index 00000000..a91adf99 --- /dev/null +++ b/CC.Yi.DALFactory/StaticDalFactory.cs @@ -0,0 +1,24 @@ +using CC.Yi.DAL; +using CC.Yi.IDAL; +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Text; +using System.Threading; + +namespace CC.Yi.DALFactory +{ + public partial class StaticDalFactory + { + private static class CallContext + { + static ConcurrentDictionary> state = new ConcurrentDictionary>(); + + public static void SetData(string name, object data) => + state.GetOrAdd(name, _ => new AsyncLocal()).Value = data; + + public static object GetData(string name) => + state.TryGetValue(name, out AsyncLocal data) ? data.Value : null; + } + } +} diff --git a/CC.Yi.DALFactory/T4DbSession.cs b/CC.Yi.DALFactory/T4DbSession.cs new file mode 100644 index 00000000..6a94b709 --- /dev/null +++ b/CC.Yi.DALFactory/T4DbSession.cs @@ -0,0 +1,18 @@ +using CC.Yi.DAL; +using CC.Yi.IDAL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace CC.Yi.DALFactory +{ + public partial class DbSession : IDbSession + { + public IstudentDal studentDal + { + get { return StaticDalFactory.GetstudentDal(); } + } + + } +} \ No newline at end of file diff --git a/CC.Yi.DALFactory/T4DbSession.tt b/CC.Yi.DALFactory/T4DbSession.tt new file mode 100644 index 00000000..541800d5 --- /dev/null +++ b/CC.Yi.DALFactory/T4DbSession.tt @@ -0,0 +1,36 @@ +<#@ template debug="false" hostspecific="true" language="C#" #> +<#@ assembly name="System.Core" #> +<#@ import namespace="System.Linq" #> +<#@ import namespace="System.Text" #> +<#@ import namespace="System.Collections.Generic" #> +<#@ import namespace="System.IO" #> +<#@ output extension=".cs" #> +<# + string solutionsPath = Host.ResolveAssemblyReference("$(SolutionDir)");//获取解决方案路径 + string txt; + StreamReader sr = new StreamReader(solutionsPath+@"\T4Model\T4Model.txt"); + txt=sr.ReadToEnd(); + sr.Close(); + string[] ModelData= txt.Split(','); + #> +using CC.Yi.DAL; +using CC.Yi.IDAL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace CC.Yi.DALFactory +{ + public partial class DbSession : IDbSession + { +<# foreach(string k in ModelData){ + #> + public I<#=k #>Dal <#=k #>Dal + { + get { return StaticDalFactory.Get<#=k #>Dal(); } + } + +<# } #> + } +} \ No newline at end of file diff --git a/CC.Yi.DALFactory/T4StaticDalFactory.cs b/CC.Yi.DALFactory/T4StaticDalFactory.cs new file mode 100644 index 00000000..2733dbb1 --- /dev/null +++ b/CC.Yi.DALFactory/T4StaticDalFactory.cs @@ -0,0 +1,25 @@ +using CC.Yi.DAL; +using CC.Yi.IDAL; +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Text; +using System.Threading; + +namespace CC.Yi.DALFactory +{ + public partial class StaticDalFactory + { + public static IstudentDal GetstudentDal() + { + IstudentDal Data = CallContext.GetData("studentDal") as IstudentDal; + if (Data == null) + { + Data = new studentDal(DbSessionFactory.GetCurrentDbSession().GetDbContent()); + CallContext.SetData("studentDal", Data); + } + return Data; + } + + } +} \ No newline at end of file diff --git a/CC.Yi.DALFactory/T4StaticDalFactory.tt b/CC.Yi.DALFactory/T4StaticDalFactory.tt new file mode 100644 index 00000000..40388a29 --- /dev/null +++ b/CC.Yi.DALFactory/T4StaticDalFactory.tt @@ -0,0 +1,43 @@ +<#@ template debug="false" hostspecific="true" language="C#" #> +<#@ assembly name="System.Core" #> +<#@ import namespace="System.Linq" #> +<#@ import namespace="System.Text" #> +<#@ import namespace="System.Collections.Generic" #> +<#@ import namespace="System.IO" #> +<#@ output extension=".cs" #> +<# + string solutionsPath = Host.ResolveAssemblyReference("$(SolutionDir)");//获取解决方案路径 + string txt; + StreamReader sr = new StreamReader(solutionsPath+@"\T4Model\T4Model.txt"); + txt=sr.ReadToEnd(); + sr.Close(); + string[] ModelData= txt.Split(','); + #> +using CC.Yi.DAL; +using CC.Yi.IDAL; +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Text; +using System.Threading; + +namespace CC.Yi.DALFactory +{ + public partial class StaticDalFactory + { +<# foreach(string k in ModelData){ + #> + public static I<#=k #>Dal Get<#=k #>Dal() + { + I<#=k #>Dal Data = CallContext.GetData("<#=k #>Dal") as I<#=k #>Dal; + if (Data == null) + { + Data = new <#=k #>Dal(DbSessionFactory.GetCurrentDbSession().GetDbContent()); + CallContext.SetData("<#=k #>Dal", Data); + } + return Data; + } + +<# } #> + } +} \ No newline at end of file diff --git a/CC.Yi.IBLL/CC.Yi.IBLL.csproj b/CC.Yi.IBLL/CC.Yi.IBLL.csproj new file mode 100644 index 00000000..54b41008 --- /dev/null +++ b/CC.Yi.IBLL/CC.Yi.IBLL.csproj @@ -0,0 +1,31 @@ + + + + Library + netcoreapp3.1 + + + + + + + + + TextTemplatingFileGenerator + T4IBLL.cs + + + + + + + + + + True + True + T4IBLL.tt + + + + diff --git a/CC.Yi.IBLL/IBaseBll.cs b/CC.Yi.IBLL/IBaseBll.cs new file mode 100644 index 00000000..adc03e26 --- /dev/null +++ b/CC.Yi.IBLL/IBaseBll.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Expressions; + +namespace CC.Yi.IBLL +{ + public interface IBaseBll where T : class, new() + { + IQueryable GetEntities(Expression> whereLambda); + + int GetCount(Expression> whereLambda);//统计数量 + + #region + //分组 + #endregion + IQueryable> GetGroup(Expression> whereLambda, Expression> groupByLambda); + + IQueryable GetPageEntities(int pageSize, int pageIndex, out int total, Expression> whereLambda, Expression> orderByLambda, bool isAsc); + + T Add(T entity); + + bool Update(T entity); + + bool Delete(T entity); + bool Delete(int id); + int DeleteList(List ids); + } +} diff --git a/CC.Yi.IBLL/T4IBLL.cs b/CC.Yi.IBLL/T4IBLL.cs new file mode 100644 index 00000000..cee3a3ad --- /dev/null +++ b/CC.Yi.IBLL/T4IBLL.cs @@ -0,0 +1,11 @@ +using CC.Yi.Model; +using System; +using System.Collections.Generic; +using System.Text; + +namespace CC.Yi.IBLL +{ + public partial interface IstudentBll : IBaseBll + { + } +} \ No newline at end of file diff --git a/CC.Yi.IBLL/T4IBLL.tt b/CC.Yi.IBLL/T4IBLL.tt new file mode 100644 index 00000000..9aff10f0 --- /dev/null +++ b/CC.Yi.IBLL/T4IBLL.tt @@ -0,0 +1,29 @@ +<#@ template debug="false" hostspecific="true" language="C#" #> +<#@ assembly name="System.Core" #> +<#@ import namespace="System.Linq" #> +<#@ import namespace="System.Text" #> +<#@ import namespace="System.Collections.Generic" #> +<#@ import namespace="System.IO" #> +<#@ output extension=".cs" #> +<# + string solutionsPath = Host.ResolveAssemblyReference("$(SolutionDir)");//获取解决方案路径 + string txt; + StreamReader sr = new StreamReader(solutionsPath+@"\T4Model\T4Model.txt"); + txt=sr.ReadToEnd(); + sr.Close(); + string[] ModelData= txt.Split(','); + #> +using CC.Yi.Model; +using System; +using System.Collections.Generic; +using System.Text; + +namespace CC.Yi.IBLL +{ +<# foreach(string k in ModelData){ + #> + public partial interface I<#=k #>Bll : IBaseBll<<#=k #>> + { + } +<# } #> +} \ No newline at end of file diff --git a/CC.Yi.IDAL/CC.Yi.IDAL.csproj b/CC.Yi.IDAL/CC.Yi.IDAL.csproj new file mode 100644 index 00000000..bfba3015 --- /dev/null +++ b/CC.Yi.IDAL/CC.Yi.IDAL.csproj @@ -0,0 +1,31 @@ + + + + Library + netcoreapp3.1 + + + + + + + + + TextTemplatingFileGenerator + T4IDAL.cs + + + + + + + + + + True + True + T4IDAL.tt + + + + diff --git a/CC.Yi.IDAL/IBaseDal.cs b/CC.Yi.IDAL/IBaseDal.cs new file mode 100644 index 00000000..09719777 --- /dev/null +++ b/CC.Yi.IDAL/IBaseDal.cs @@ -0,0 +1,50 @@ +using System; +using System.Linq; +using System.Linq.Expressions; + +namespace CC.Yi.IDAL +{ + public interface IBaseDal where T : class, new() + { + #region + //通过表达式得到实体 + #endregion + IQueryable GetEntities(Expression> whereLambda); + + #region + //统计数量 + #endregion + int GetCount(Expression> whereLambda);//统计数量 + + #region + //分组 + #endregion + IQueryable> GetGroup(Expression> whereLambda, Expression> groupByLambda); + + + #region + //通过得到实体,分页版本 + #endregion + IQueryable GetPageEntities(int pageSize, int pageIndex, out int total, Expression> whereLambda, Expression> orderByLambda, bool isAsc); + + #region + //添加实体 + #endregion + T Add(T entity); + + #region + //更新实体 + #endregion + bool Update(T entity); + + #region + //删除实体 + #endregion + bool Delete(T entity); + + #region + //通过id进行删除实体 + #endregion + bool Detete(int id); + } +} diff --git a/CC.Yi.IDAL/IDbSession.cs b/CC.Yi.IDAL/IDbSession.cs new file mode 100644 index 00000000..633da7f1 --- /dev/null +++ b/CC.Yi.IDAL/IDbSession.cs @@ -0,0 +1,18 @@ +using CC.Yi.Model; +using Microsoft.EntityFrameworkCore; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace CC.Yi.IDAL +{ + public partial interface IDbSession + { + DataContext GetDbContent(); + int SaveChanges(); + } + + + +} diff --git a/CC.Yi.IDAL/T4IDAL.cs b/CC.Yi.IDAL/T4IDAL.cs new file mode 100644 index 00000000..8b900b8c --- /dev/null +++ b/CC.Yi.IDAL/T4IDAL.cs @@ -0,0 +1,11 @@ +using CC.Yi.Model; +using System; +using System.Collections.Generic; +using System.Text; + +namespace CC.Yi.IDAL +{ + public partial interface IstudentDal:IBaseDal + { + } +} \ No newline at end of file diff --git a/CC.Yi.IDAL/T4IDAL.tt b/CC.Yi.IDAL/T4IDAL.tt new file mode 100644 index 00000000..7faf648f --- /dev/null +++ b/CC.Yi.IDAL/T4IDAL.tt @@ -0,0 +1,29 @@ +<#@ template debug="false" hostspecific="true" language="C#" #> +<#@ assembly name="System.Core" #> +<#@ import namespace="System.Linq" #> +<#@ import namespace="System.Text" #> +<#@ import namespace="System.Collections.Generic" #> +<#@ import namespace="System.IO" #> +<#@ output extension=".cs" #> +<# + string solutionsPath = Host.ResolveAssemblyReference("$(SolutionDir)");//获取解决方案路径 + string txt; + StreamReader sr = new StreamReader(solutionsPath+@"\T4Model\T4Model.txt"); + txt=sr.ReadToEnd(); + sr.Close(); + string[] ModelData= txt.Split(','); + #> +using CC.Yi.Model; +using System; +using System.Collections.Generic; +using System.Text; + +namespace CC.Yi.IDAL +{ +<# foreach(string k in ModelData){ + #> + public partial interface I<#=k #>Dal:IBaseDal<<#=k #>> + { + } +<# } #> +} \ No newline at end of file diff --git a/CC.Yi.Model/CC.Yi.Model.csproj b/CC.Yi.Model/CC.Yi.Model.csproj new file mode 100644 index 00000000..dffcf8d1 --- /dev/null +++ b/CC.Yi.Model/CC.Yi.Model.csproj @@ -0,0 +1,42 @@ + + + + netcoreapp3.1 + + + + + True + True + T4DataContext.tt + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + TextTemplatingFileGenerator + T4DataContext.cs + + + + + + + + + + True + True + T4DataContext.tt + + + + diff --git a/CC.Yi.Model/DataContext.cs b/CC.Yi.Model/DataContext.cs new file mode 100644 index 00000000..df55c3b5 --- /dev/null +++ b/CC.Yi.Model/DataContext.cs @@ -0,0 +1,13 @@ +using Microsoft.EntityFrameworkCore; +using System; + +namespace CC.Yi.Model +{ + public partial class DataContext : DbContext + { + public DataContext(DbContextOptions options) : base(options) + { + + } + } +} diff --git a/CC.Yi.Model/T4DataContext.cs b/CC.Yi.Model/T4DataContext.cs new file mode 100644 index 00000000..ab0edf2f --- /dev/null +++ b/CC.Yi.Model/T4DataContext.cs @@ -0,0 +1,12 @@ +using Microsoft.EntityFrameworkCore; +using System; +using System.Collections.Generic; +using System.Text; + +namespace CC.Yi.Model +{ + public partial class DataContext :DbContext + { + public DbSet student { get; set; } + } +} \ No newline at end of file diff --git a/CC.Yi.Model/T4DataContext.tt b/CC.Yi.Model/T4DataContext.tt new file mode 100644 index 00000000..dcfd940e --- /dev/null +++ b/CC.Yi.Model/T4DataContext.tt @@ -0,0 +1,30 @@ +<#@ template debug="false" hostspecific="true" language="C#" #> +<#@ assembly name="System.Core" #> +<#@ import namespace="System.Linq" #> +<#@ import namespace="System.Text" #> +<#@ import namespace="System.Collections.Generic" #> +<#@ import namespace="System.IO" #> +<#@ output extension=".cs" #> +<# + string solutionsPath = Host.ResolveAssemblyReference("$(SolutionDir)");//获取解决方案路径 + string txt; + StreamReader sr = new StreamReader(solutionsPath+@"\T4Model\T4Model.txt"); + txt=sr.ReadToEnd(); + sr.Close(); + string[] ModelData= txt.Split(','); + #> +using Microsoft.EntityFrameworkCore; +using System; +using System.Collections.Generic; +using System.Text; + +namespace CC.Yi.Model +{ + public partial class DataContext :DbContext + { +<# foreach(string k in ModelData){ + #> + public DbSet<<#=k #>> <#=k #> { get; set; } +<# } #> + } +} \ No newline at end of file diff --git a/CC.Yi.Model/student.cs b/CC.Yi.Model/student.cs new file mode 100644 index 00000000..8a11819c --- /dev/null +++ b/CC.Yi.Model/student.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Text; + +namespace CC.Yi.Model +{ + public class student + { + [Key] + [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)] + public int id { get; set; } + public int name { get; set; } + } +} diff --git a/CC.Yi.ViewModel/CC.Yi.ViewModel.csproj b/CC.Yi.ViewModel/CC.Yi.ViewModel.csproj new file mode 100644 index 00000000..cefa80a0 --- /dev/null +++ b/CC.Yi.ViewModel/CC.Yi.ViewModel.csproj @@ -0,0 +1,8 @@ + + + + Library + netcoreapp3.1 + + + diff --git a/CC.Yi.ViewModel/Program.cs b/CC.Yi.ViewModel/Program.cs new file mode 100644 index 00000000..69cc429d --- /dev/null +++ b/CC.Yi.ViewModel/Program.cs @@ -0,0 +1,12 @@ +using System; + +namespace CC.Yi.ViewModel +{ + class Program + { + static void Main(string[] args) + { + Console.WriteLine("Hello World!"); + } + } +} diff --git a/CC.Yi.sln b/CC.Yi.sln new file mode 100644 index 00000000..6e606c50 --- /dev/null +++ b/CC.Yi.sln @@ -0,0 +1,94 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30907.101 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DAL", "DAL", "{9D0D4A54-057E-46C3-BBFE-CA01F7ECEDAE}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "BLL", "BLL", "{CC5F4204-DFB6-4BB5-9E49-BED084063ED8}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "API", "API", "{1A509C83-F994-4422-A74F-8FFA4805D849}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CC.Yi.API", "CC.Yi.API\CC.Yi.API.csproj", "{CDB5556F-43FF-44F6-B33D-AC642E5CD30C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CC.Yi.BLL", "CC.Yi.BLL\CC.Yi.BLL.csproj", "{AE9B4D8A-0CED-49D1-81C7-EBD221E41AB6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CC.Yi.IBLL", "CC.Yi.IBLL\CC.Yi.IBLL.csproj", "{74177F89-72D5-45FE-8A4F-91FAD9E03D36}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CC.Yi.DAL", "CC.Yi.DAL\CC.Yi.DAL.csproj", "{72FD0850-15FA-4A6F-B865-E1B38603307D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CC.Yi.IDAL", "CC.Yi.IDAL\CC.Yi.IDAL.csproj", "{BD77D98A-9F28-4C2D-A260-C3BB919B58E7}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Common", "Common", "{123D1D39-849C-4220-A973-EB9760421CB3}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Model", "Model", "{38B8D898-4BBF-4DDB-8E29-6D6CEB7808C9}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CC.Yi.Model", "CC.Yi.Model\CC.Yi.Model.csproj", "{8827547B-E04B-4430-A0DF-E87FCA40E3AB}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CC.Yi.ViewModel", "CC.Yi.ViewModel\CC.Yi.ViewModel.csproj", "{32F323F1-E2FA-4186-AC33-263465012D15}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CC.Yi.Common", "CC.Yi.Common\CC.Yi.Common.csproj", "{9D6E5DD7-FA02-4532-8BAC-406FB80AFEAC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CC.Yi.DALFactory", "CC.Yi.DALFactory\CC.Yi.DALFactory.csproj", "{ACB6D3EE-FADE-4F07-9D12-C9E3A5F72335}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {CDB5556F-43FF-44F6-B33D-AC642E5CD30C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CDB5556F-43FF-44F6-B33D-AC642E5CD30C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CDB5556F-43FF-44F6-B33D-AC642E5CD30C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CDB5556F-43FF-44F6-B33D-AC642E5CD30C}.Release|Any CPU.Build.0 = Release|Any CPU + {AE9B4D8A-0CED-49D1-81C7-EBD221E41AB6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AE9B4D8A-0CED-49D1-81C7-EBD221E41AB6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AE9B4D8A-0CED-49D1-81C7-EBD221E41AB6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AE9B4D8A-0CED-49D1-81C7-EBD221E41AB6}.Release|Any CPU.Build.0 = Release|Any CPU + {74177F89-72D5-45FE-8A4F-91FAD9E03D36}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {74177F89-72D5-45FE-8A4F-91FAD9E03D36}.Debug|Any CPU.Build.0 = Debug|Any CPU + {74177F89-72D5-45FE-8A4F-91FAD9E03D36}.Release|Any CPU.ActiveCfg = Release|Any CPU + {74177F89-72D5-45FE-8A4F-91FAD9E03D36}.Release|Any CPU.Build.0 = Release|Any CPU + {72FD0850-15FA-4A6F-B865-E1B38603307D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {72FD0850-15FA-4A6F-B865-E1B38603307D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {72FD0850-15FA-4A6F-B865-E1B38603307D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {72FD0850-15FA-4A6F-B865-E1B38603307D}.Release|Any CPU.Build.0 = Release|Any CPU + {BD77D98A-9F28-4C2D-A260-C3BB919B58E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BD77D98A-9F28-4C2D-A260-C3BB919B58E7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BD77D98A-9F28-4C2D-A260-C3BB919B58E7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BD77D98A-9F28-4C2D-A260-C3BB919B58E7}.Release|Any CPU.Build.0 = Release|Any CPU + {8827547B-E04B-4430-A0DF-E87FCA40E3AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8827547B-E04B-4430-A0DF-E87FCA40E3AB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8827547B-E04B-4430-A0DF-E87FCA40E3AB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8827547B-E04B-4430-A0DF-E87FCA40E3AB}.Release|Any CPU.Build.0 = Release|Any CPU + {32F323F1-E2FA-4186-AC33-263465012D15}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {32F323F1-E2FA-4186-AC33-263465012D15}.Debug|Any CPU.Build.0 = Debug|Any CPU + {32F323F1-E2FA-4186-AC33-263465012D15}.Release|Any CPU.ActiveCfg = Release|Any CPU + {32F323F1-E2FA-4186-AC33-263465012D15}.Release|Any CPU.Build.0 = Release|Any CPU + {9D6E5DD7-FA02-4532-8BAC-406FB80AFEAC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9D6E5DD7-FA02-4532-8BAC-406FB80AFEAC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9D6E5DD7-FA02-4532-8BAC-406FB80AFEAC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9D6E5DD7-FA02-4532-8BAC-406FB80AFEAC}.Release|Any CPU.Build.0 = Release|Any CPU + {ACB6D3EE-FADE-4F07-9D12-C9E3A5F72335}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ACB6D3EE-FADE-4F07-9D12-C9E3A5F72335}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ACB6D3EE-FADE-4F07-9D12-C9E3A5F72335}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ACB6D3EE-FADE-4F07-9D12-C9E3A5F72335}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {CDB5556F-43FF-44F6-B33D-AC642E5CD30C} = {1A509C83-F994-4422-A74F-8FFA4805D849} + {AE9B4D8A-0CED-49D1-81C7-EBD221E41AB6} = {CC5F4204-DFB6-4BB5-9E49-BED084063ED8} + {74177F89-72D5-45FE-8A4F-91FAD9E03D36} = {CC5F4204-DFB6-4BB5-9E49-BED084063ED8} + {72FD0850-15FA-4A6F-B865-E1B38603307D} = {9D0D4A54-057E-46C3-BBFE-CA01F7ECEDAE} + {BD77D98A-9F28-4C2D-A260-C3BB919B58E7} = {9D0D4A54-057E-46C3-BBFE-CA01F7ECEDAE} + {8827547B-E04B-4430-A0DF-E87FCA40E3AB} = {38B8D898-4BBF-4DDB-8E29-6D6CEB7808C9} + {32F323F1-E2FA-4186-AC33-263465012D15} = {38B8D898-4BBF-4DDB-8E29-6D6CEB7808C9} + {9D6E5DD7-FA02-4532-8BAC-406FB80AFEAC} = {123D1D39-849C-4220-A973-EB9760421CB3} + {ACB6D3EE-FADE-4F07-9D12-C9E3A5F72335} = {9D0D4A54-057E-46C3-BBFE-CA01F7ECEDAE} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {22DD3529-6AD4-413A-B7B3-D8335E6F47C9} + EndGlobalSection +EndGlobal diff --git a/T4Model/T4Model.txt b/T4Model/T4Model.txt new file mode 100644 index 00000000..36227abb --- /dev/null +++ b/T4Model/T4Model.txt @@ -0,0 +1 @@ +student \ No newline at end of file