Add drafts for Interface business and repository + DataContract presentation
This commit is contained in:
10
Back/skydiveLogs-api.Business/Interface/IAircraftService.cs
Normal file
10
Back/skydiveLogs-api.Business/Interface/IAircraftService.cs
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace skydiveLogs_api.Business.Interface
|
||||||
|
{
|
||||||
|
public interface IAircraftService
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
10
Back/skydiveLogs-api.Business/Interface/IDropZoneService.cs
Normal file
10
Back/skydiveLogs-api.Business/Interface/IDropZoneService.cs
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace skydiveLogs_api.Business.Interface
|
||||||
|
{
|
||||||
|
public interface IDropZoneService
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
10
Back/skydiveLogs-api.Business/Interface/IJumpService.cs
Normal file
10
Back/skydiveLogs-api.Business/Interface/IJumpService.cs
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace skydiveLogs_api.Business.Interface
|
||||||
|
{
|
||||||
|
public interface IJumpService
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
10
Back/skydiveLogs-api.Business/Interface/IJumpTypeService.cs
Normal file
10
Back/skydiveLogs-api.Business/Interface/IJumpTypeService.cs
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace skydiveLogs_api.Business.Interface
|
||||||
|
{
|
||||||
|
public interface IJumpTypeService
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,10 +5,6 @@
|
|||||||
<RootNamespace>skydiveLogs_api.Business</RootNamespace>
|
<RootNamespace>skydiveLogs_api.Business</RootNamespace>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<Folder Include="Interface\" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\skydiveLogs-api.Data\skydiveLogs-api.Data.csproj" />
|
<ProjectReference Include="..\skydiveLogs-api.Data\skydiveLogs-api.Data.csproj" />
|
||||||
<ProjectReference Include="..\skydiveLogs-api.Model\skydiveLogs-api.Model.csproj" />
|
<ProjectReference Include="..\skydiveLogs-api.Model\skydiveLogs-api.Model.csproj" />
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using skydiveLogs_api.Data.Interface;
|
||||||
|
|
||||||
namespace skydiveLogs_api.Data
|
namespace skydiveLogs_api.Data
|
||||||
{
|
{
|
||||||
class DropZoneRepository
|
public class DropZoneRepository : IDropZoneRepository
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using skydiveLogs_api.Data.Interface;
|
||||||
|
|
||||||
namespace skydiveLogs_api.Data
|
namespace skydiveLogs_api.Data
|
||||||
{
|
{
|
||||||
class GearRepository
|
public class GearRepository : IGearRepository
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
10
Back/skydiveLogs-api.Data/Interface/IDropZoneRepository.cs
Normal file
10
Back/skydiveLogs-api.Data/Interface/IDropZoneRepository.cs
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace skydiveLogs_api.Data.Interface
|
||||||
|
{
|
||||||
|
public interface IDropZoneRepository
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
10
Back/skydiveLogs-api.Data/Interface/IGearRepository.cs
Normal file
10
Back/skydiveLogs-api.Data/Interface/IGearRepository.cs
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace skydiveLogs_api.Data.Interface
|
||||||
|
{
|
||||||
|
public interface IGearRepository
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
10
Back/skydiveLogs-api.Data/Interface/IJumpRepository.cs
Normal file
10
Back/skydiveLogs-api.Data/Interface/IJumpRepository.cs
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace skydiveLogs_api.Data.Interface
|
||||||
|
{
|
||||||
|
public interface IJumpRepository
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
10
Back/skydiveLogs-api.Data/Interface/IJumpTypeRepository.cs
Normal file
10
Back/skydiveLogs-api.Data/Interface/IJumpTypeRepository.cs
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace skydiveLogs_api.Data.Interface
|
||||||
|
{
|
||||||
|
public interface IJumpTypeRepository
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,10 +1,11 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using skydiveLogs_api.Data.Interface;
|
||||||
|
|
||||||
namespace skydiveLogs_api.Data
|
namespace skydiveLogs_api.Data
|
||||||
{
|
{
|
||||||
class JumpRepository
|
public class JumpRepository : IJumpRepository
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using skydiveLogs_api.Data.Interface;
|
||||||
|
|
||||||
namespace skydiveLogs_api.Data
|
namespace skydiveLogs_api.Data
|
||||||
{
|
{
|
||||||
class JumpTypeRepository
|
public class JumpTypeRepository : IJumpTypeRepository
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ using System.Linq;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using skydiveLogs_api.Business.Interface;
|
||||||
|
using skydiveLogs_api.DataContract;
|
||||||
|
|
||||||
namespace skydiveLogs_api.Controllers
|
namespace skydiveLogs_api.Controllers
|
||||||
{
|
{
|
||||||
@@ -11,6 +13,11 @@ namespace skydiveLogs_api.Controllers
|
|||||||
[ApiController]
|
[ApiController]
|
||||||
public class AircraftController : ControllerBase
|
public class AircraftController : ControllerBase
|
||||||
{
|
{
|
||||||
|
public AircraftController(IAircraftService aircraftService)
|
||||||
|
{
|
||||||
|
_aircraftService = aircraftService;
|
||||||
|
}
|
||||||
|
|
||||||
// GET: api/Aircraft
|
// GET: api/Aircraft
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public IEnumerable<AircraftResp> Get()
|
public IEnumerable<AircraftResp> Get()
|
||||||
@@ -42,5 +49,7 @@ namespace skydiveLogs_api.Controllers
|
|||||||
public void Delete(int id)
|
public void Delete(int id)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private readonly IAircraftService _aircraftService;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ using System.Linq;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using skydiveLogs_api.Business.Interface;
|
||||||
using skydiveLogs_api.DataContract;
|
using skydiveLogs_api.DataContract;
|
||||||
|
|
||||||
namespace skydiveLogs_api.Controllers
|
namespace skydiveLogs_api.Controllers
|
||||||
@@ -12,6 +13,11 @@ namespace skydiveLogs_api.Controllers
|
|||||||
[ApiController]
|
[ApiController]
|
||||||
public class DropZoneController : ControllerBase
|
public class DropZoneController : ControllerBase
|
||||||
{
|
{
|
||||||
|
public DropZoneController(IDropZoneService dropZoneService)
|
||||||
|
{
|
||||||
|
_dropZoneService = dropZoneService;
|
||||||
|
}
|
||||||
|
|
||||||
// GET: api/DropZone
|
// GET: api/DropZone
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public IEnumerable<DropZoneResp> Get()
|
public IEnumerable<DropZoneResp> Get()
|
||||||
@@ -43,5 +49,7 @@ namespace skydiveLogs_api.Controllers
|
|||||||
public void Delete(int id)
|
public void Delete(int id)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private readonly IDropZoneService _dropZoneService;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ using System.Linq;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using skydiveLogs_api.Business.Interface;
|
||||||
|
using skydiveLogs_api.DataContract;
|
||||||
|
|
||||||
namespace skydiveLogs_api.Controllers
|
namespace skydiveLogs_api.Controllers
|
||||||
{
|
{
|
||||||
@@ -11,6 +13,11 @@ namespace skydiveLogs_api.Controllers
|
|||||||
[ApiController]
|
[ApiController]
|
||||||
public class JumpController : ControllerBase
|
public class JumpController : ControllerBase
|
||||||
{
|
{
|
||||||
|
public JumpController(IJumpService jumpService)
|
||||||
|
{
|
||||||
|
_jumpService = jumpService;
|
||||||
|
}
|
||||||
|
|
||||||
// GET: api/Jump
|
// GET: api/Jump
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public IEnumerable<JumpResp> Get()
|
public IEnumerable<JumpResp> Get()
|
||||||
@@ -42,5 +49,7 @@ namespace skydiveLogs_api.Controllers
|
|||||||
public void Delete(int id)
|
public void Delete(int id)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private readonly IJumpService _jumpService;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ using System.Linq;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using skydiveLogs_api.Business.Interface;
|
||||||
|
using skydiveLogs_api.DataContract;
|
||||||
|
|
||||||
namespace skydiveLogs_api.Controllers
|
namespace skydiveLogs_api.Controllers
|
||||||
{
|
{
|
||||||
@@ -11,6 +13,11 @@ namespace skydiveLogs_api.Controllers
|
|||||||
[ApiController]
|
[ApiController]
|
||||||
public class JumpTypeController : ControllerBase
|
public class JumpTypeController : ControllerBase
|
||||||
{
|
{
|
||||||
|
public JumpTypeController(IJumpTypeService jumpTypeService)
|
||||||
|
{
|
||||||
|
_jumpTypeService = jumpTypeService;
|
||||||
|
}
|
||||||
|
|
||||||
// GET: api/JumpType
|
// GET: api/JumpType
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public IEnumerable<JumpTypeResp> Get()
|
public IEnumerable<JumpTypeResp> Get()
|
||||||
@@ -42,5 +49,7 @@ namespace skydiveLogs_api.Controllers
|
|||||||
public void Delete(int id)
|
public void Delete(int id)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private readonly IJumpTypeService _jumpTypeService;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
11
Back/skydiveLogs-api/DataContract/AircraftReq.cs
Normal file
11
Back/skydiveLogs-api/DataContract/AircraftReq.cs
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace skydiveLogs_api.DataContract
|
||||||
|
{
|
||||||
|
public class AircraftReq
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Back/skydiveLogs-api/DataContract/AircraftResp.cs
Normal file
11
Back/skydiveLogs-api/DataContract/AircraftResp.cs
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace skydiveLogs_api.DataContract
|
||||||
|
{
|
||||||
|
public class AircraftResp
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Back/skydiveLogs-api/DataContract/JumpReq.cs
Normal file
11
Back/skydiveLogs-api/DataContract/JumpReq.cs
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace skydiveLogs_api.DataContract
|
||||||
|
{
|
||||||
|
public class JumpReq
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Back/skydiveLogs-api/DataContract/JumpResp.cs
Normal file
11
Back/skydiveLogs-api/DataContract/JumpResp.cs
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace skydiveLogs_api.DataContract
|
||||||
|
{
|
||||||
|
public class JumpResp
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Back/skydiveLogs-api/DataContract/JumpTypeReq.cs
Normal file
11
Back/skydiveLogs-api/DataContract/JumpTypeReq.cs
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace skydiveLogs_api.DataContract
|
||||||
|
{
|
||||||
|
public class JumpTypeReq
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Back/skydiveLogs-api/DataContract/JumpTypeResp.cs
Normal file
11
Back/skydiveLogs-api/DataContract/JumpTypeResp.cs
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace skydiveLogs_api.DataContract
|
||||||
|
{
|
||||||
|
public class JumpTypeResp
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,12 +1,5 @@
|
|||||||
using System;
|
using Microsoft.AspNetCore;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Microsoft.AspNetCore;
|
|
||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
using Microsoft.Extensions.Configuration;
|
|
||||||
using Microsoft.Extensions.Logging;
|
|
||||||
|
|
||||||
namespace skydiveLogs_api
|
namespace skydiveLogs_api
|
||||||
{
|
{
|
||||||
@@ -18,7 +11,6 @@ namespace skydiveLogs_api
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
|
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
|
||||||
WebHost.CreateDefaultBuilder(args)
|
WebHost.CreateDefaultBuilder(args).UseStartup<Startup>();
|
||||||
.UseStartup<Startup>();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +1,8 @@
|
|||||||
using System;
|
using Microsoft.AspNetCore.Builder;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Microsoft.AspNetCore.Builder;
|
|
||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
using Microsoft.AspNetCore.HttpsPolicy;
|
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.Extensions.Logging;
|
|
||||||
using Microsoft.Extensions.Options;
|
|
||||||
|
|
||||||
namespace skydiveLogs_api
|
namespace skydiveLogs_api
|
||||||
{
|
{
|
||||||
@@ -26,6 +19,16 @@ namespace skydiveLogs_api
|
|||||||
public void ConfigureServices(IServiceCollection services)
|
public void ConfigureServices(IServiceCollection services)
|
||||||
{
|
{
|
||||||
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
|
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
|
||||||
|
|
||||||
|
// IoC
|
||||||
|
//services.AddSingleton<IConfigurationRoot>(Configuration);
|
||||||
|
//services.AddSingleton<Services.IGroupService, Services.GroupService>();
|
||||||
|
//services.AddSingleton<Services.IUserService, Services.UserService>();
|
||||||
|
//services.AddSingleton<Services.IPermissionService, Services.PermissionService>();
|
||||||
|
|
||||||
|
//services.AddScoped<Builder.IBuilderVmGroup, Builder.BuilderVmGroup>();
|
||||||
|
//services.AddScoped<Builder.IBuilderVmUser, Builder.BuilderVmUser>();
|
||||||
|
//services.AddScoped<Builder.IBuilderVmPermission, Builder.BuilderVmPermission>();
|
||||||
}
|
}
|
||||||
|
|
||||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||||
|
|||||||
Reference in New Issue
Block a user