Merge branch 'master' of http://git2.aycode.com/Adam/TourIAm
This commit is contained in:
commit
68915f616d
|
|
@ -0,0 +1,35 @@
|
|||
using Microsoft.EntityFrameworkCore;
|
||||
using TIAM.Database.DbContexts;
|
||||
|
||||
namespace TIAM.Database.Test
|
||||
{
|
||||
[TestClass]
|
||||
public class DatabaseTest
|
||||
{
|
||||
[TestInitialize]
|
||||
public void Setup()
|
||||
{
|
||||
}
|
||||
|
||||
[TestCleanup]
|
||||
public void TearDown()
|
||||
{
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void MsTest_Test()
|
||||
{
|
||||
Assert.IsTrue(true);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void DatabaseExistsTest()
|
||||
{
|
||||
using var ctx = new TransferDestinationDbContext();
|
||||
//ctx.Database.OpenConnection();
|
||||
|
||||
var isConnected = ctx.Database.CanConnect();
|
||||
Assert.IsTrue(isConnected);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
global using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
|
||||
<IsPackable>false</IsPackable>
|
||||
<IsTestProject>true</IsTestProject>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.13" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="7.0.13" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.13" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.1" />
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="2.2.10" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="2.2.10" />
|
||||
<PackageReference Include="coverlet.collector" Version="3.2.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\TIAM.Database\TIAM.Database.csproj" />
|
||||
<ProjectReference Include="..\TIAM.Entities.Server\TIAM.Entities.Server.csproj" />
|
||||
<ProjectReference Include="..\TIAM.Entities\TIAM.Entities.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="AyCode.Core">
|
||||
<HintPath>..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Core.Server">
|
||||
<HintPath>..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Core.Server.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Database">
|
||||
<HintPath>..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Database.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Entities">
|
||||
<HintPath>..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Entities.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Entities.Server">
|
||||
<HintPath>..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Entities.Server.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Interfaces">
|
||||
<HintPath>..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Interfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Interfaces.Server">
|
||||
<HintPath>..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Interfaces.Server.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace TIAM.Database.DataLayers.TransferDestinations
|
||||
{
|
||||
internal class TransferDestinationDal
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Security;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using AyCode.Database.DbContexts;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace TIAM.Database.DbContexts
|
||||
{
|
||||
public class TiamDbContextBase : DbContextBase
|
||||
{
|
||||
public TiamDbContextBase() //: this(string.Empty)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public TiamDbContextBase(string name) : base(name)
|
||||
{
|
||||
}
|
||||
|
||||
public TiamDbContextBase(DbContextOptions<DbContext> options, string name) : base(options, name)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
{
|
||||
base.OnConfiguring(optionsBuilder);
|
||||
|
||||
var connString = "Data Source=185.51.190.197;Initial Catalog=TIAM_DEV;Trusted_Connection=false;Encrypt=false;TrustServerCertificate=True;Connect Timeout=200;User ID=Anata_Development_Team;Password=v6f_?xNfg9N1;MultipleActiveResultSets=true";
|
||||
optionsBuilder.UseSqlServer(connString);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using TIAM.Entities.TransferDestinations;
|
||||
|
||||
namespace TIAM.Database.DbContexts
|
||||
{
|
||||
public class TransferDestinationDbContext : TiamDbContextBase
|
||||
{
|
||||
public DbSet<TransferDestination> TransferDestinations { get; set; }
|
||||
|
||||
public TransferDestinationDbContext()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public TransferDestinationDbContext(string name) : base(name)
|
||||
{
|
||||
}
|
||||
|
||||
public TransferDestinationDbContext(DbContextOptions<DbContext> options, string name) : base(options, name)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.13" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="7.0.13" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.13" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Extensions\" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\TIAM.Entities.Server\TIAM.Entities.Server.csproj" />
|
||||
<ProjectReference Include="..\TIAM.Entities\TIAM.Entities.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="AyCode.Core">
|
||||
<HintPath>..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Core.Server">
|
||||
<HintPath>..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Core.Server.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Database">
|
||||
<HintPath>..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Database.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Entities">
|
||||
<HintPath>..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Entities.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Entities.Server">
|
||||
<HintPath>..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Entities.Server.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Interfaces">
|
||||
<HintPath>..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Interfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Interfaces.Server">
|
||||
<HintPath>..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Interfaces.Server.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="AyCode.Core">
|
||||
<HintPath>..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Core.Server">
|
||||
<HintPath>..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Core.Server.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Entities">
|
||||
<HintPath>..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Entities.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Entities.Server">
|
||||
<HintPath>..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Entities.Server.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Interfaces">
|
||||
<HintPath>..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Interfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Interfaces.Server">
|
||||
<HintPath>..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Interfaces.Server.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using AyCode.Entities.Interfaces;
|
||||
using AyCode.Interfaces.TimeStampInfo;
|
||||
|
||||
namespace TIAM.Entities.TransferDestinations
|
||||
{
|
||||
[Table("TransferDestination")]
|
||||
public class TransferDestination : IEntityGuid, ITimeStampInfo
|
||||
{
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.None)]
|
||||
public Guid Id
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public string Name
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public string Description
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public decimal Longitude
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public decimal Latitude
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public DateTime Created { get; set; }
|
||||
public DateTime Modified { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v7.0", FrameworkDisplayName = ".NET 7.0")]
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("TIAMDLL.Common")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("TIAMDLL.Common")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("TIAMDLL.Common")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
// Generated by the MSBuild WriteCodeFragment class.
|
||||
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
is_global = true
|
||||
build_property.TargetFramework = net7.0
|
||||
build_property.TargetPlatformMinVersion =
|
||||
build_property.UsingMicrosoftNETSdkWeb =
|
||||
build_property.ProjectTypeGuids =
|
||||
build_property.InvariantGlobalization =
|
||||
build_property.PlatformNeutralAssembly =
|
||||
build_property.EnforceExtendedAnalyzerRules =
|
||||
build_property._SupportedPlatformList = Linux,macOS,Windows
|
||||
build_property.RootNamespace = TIAMDLL.Common
|
||||
build_property.ProjectDir = C:\Users\Ádám\Source\Repos\TourIAm\TIAMDLL.Common\
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
// <auto-generated/>
|
||||
global using global::System;
|
||||
global using global::System.Collections.Generic;
|
||||
global using global::System.IO;
|
||||
global using global::System.Linq;
|
||||
global using global::System.Net.Http;
|
||||
global using global::System.Threading;
|
||||
global using global::System.Threading.Tasks;
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
using System.Net.Http.Json;
|
||||
using TIAM.Entities.TransferDestinations;
|
||||
using TIAMWebApp.Shared.Application.Interfaces;
|
||||
using TIAMWebApp.Shared.Application.Models;
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ else
|
|||
<option value="Select" selected disabled="disabled">(Choose Destination)</option>
|
||||
@foreach (var dest in TransferDestinations)
|
||||
{
|
||||
<option value="@dest.DestinationId"> @dest.DestinationName</option>
|
||||
<option value="@dest.Id"> @dest.Name</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ using System.Collections.Generic;
|
|||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using TIAM.Entities.TransferDestinations;
|
||||
using TIAMWebApp.Shared.Application.Interfaces;
|
||||
using TIAMWebApp.Shared.Application.Models;
|
||||
|
||||
|
|
@ -40,7 +41,7 @@ namespace TIAMSharedUI.Pages
|
|||
get;
|
||||
set;
|
||||
}
|
||||
protected async override Task OnInitializedAsync()
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
TransferDestinations = (await TransferDataService.GetDestinationsAsync()).ToList();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace TIAMSharedUI.Pages.User
|
||||
{
|
||||
public partial class Home
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
using System.Net.Http.Json;
|
||||
using TIAM.Entities.TransferDestinations;
|
||||
using TIAMWebApp.Shared.Application.Interfaces;
|
||||
using TIAMWebApp.Shared.Application.Models;
|
||||
|
||||
|
|
@ -12,6 +13,7 @@ namespace TIAMWebApp.Client.Services
|
|||
{
|
||||
this.http = http;
|
||||
}
|
||||
|
||||
public Task<TransferDestination[]?> GetDestinationsAsync()
|
||||
{
|
||||
return http.GetFromJsonAsync<TransferDestination[]>("TransferDataAPI");
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.Reflection.Metadata;
|
||||
using TIAM.Database.DbContexts;
|
||||
using TIAM.Entities.TransferDestinations;
|
||||
using TIAMWebApp.Shared.Application.Models;
|
||||
|
||||
namespace TIAMWebApp.Server.Controllers
|
||||
|
|
@ -8,30 +11,35 @@ namespace TIAMWebApp.Server.Controllers
|
|||
[Route("[controller]")]
|
||||
public class TransferDataAPIController : ControllerBase
|
||||
{
|
||||
private static readonly TransferDestination[] Names = new TransferDestination[]
|
||||
{
|
||||
/*"Castle of Buda", "Hungarian National Museum", "Parliament of Hungary", "Heroes square", "Gellert Hill", "Margaret Island"*/
|
||||
new() { DestinationId = 1, DestinationName = "Airport", DestinationDescription = "International airport of Budapest", DestinationLatitude = 42.234444f, DestinationLongitude = 39.100010f },
|
||||
new() { DestinationId = 2, DestinationName = "Castle of Buda", DestinationDescription = "International airport of Budapest", DestinationLatitude = 42.234444f, DestinationLongitude = 39.100010f },
|
||||
new() { DestinationId = 3, DestinationName = "Hungarian National Museum", DestinationDescription = "International airport of Budapest", DestinationLatitude = 42.234444f, DestinationLongitude = 39.100010f },
|
||||
new() { DestinationId = 4, DestinationName = "Parliament of Hungary", DestinationDescription = "International airport of Budapest", DestinationLatitude = 42.234444f, DestinationLongitude = 39.100010f },
|
||||
new() { DestinationId = 5, DestinationName = "Heroes square", DestinationDescription = "International airport of Budapest", DestinationLatitude = 42.234444f, DestinationLongitude = 39.100010f },
|
||||
new() { DestinationId = 6, DestinationName = "Gellert Hill", DestinationDescription = "International airport of Budapest", DestinationLatitude = 42.234444f, DestinationLongitude = 39.100010f },
|
||||
new() { DestinationId = 6, DestinationName = "Margaret Island", DestinationDescription = "International airport of Budapest", DestinationLatitude = 42.234444f, DestinationLongitude = 39.100010f }
|
||||
//private static readonly TransferDestination[] Names = new TransferDestination[]
|
||||
//{
|
||||
// /*"Castle of Buda", "Hungarian National Museum", "Parliament of Hungary", "Heroes square", "Gellert Hill", "Margaret Island"*/
|
||||
// new() { DestinationId = 1, DestinationName = "Airport", DestinationDescription = "International airport of Budapest", DestinationLatitude = 42.234444f, DestinationLongitude = 39.100010f },
|
||||
// new() { DestinationId = 2, DestinationName = "Castle of Buda", DestinationDescription = "International airport of Budapest", DestinationLatitude = 42.234444f, DestinationLongitude = 39.100010f },
|
||||
// new() { DestinationId = 3, DestinationName = "Hungarian National Museum", DestinationDescription = "International airport of Budapest", DestinationLatitude = 42.234444f, DestinationLongitude = 39.100010f },
|
||||
// new() { DestinationId = 4, DestinationName = "Parliament of Hungary", DestinationDescription = "International airport of Budapest", DestinationLatitude = 42.234444f, DestinationLongitude = 39.100010f },
|
||||
// new() { DestinationId = 5, DestinationName = "Heroes square", DestinationDescription = "International airport of Budapest", DestinationLatitude = 42.234444f, DestinationLongitude = 39.100010f },
|
||||
// new() { DestinationId = 6, DestinationName = "Gellert Hill", DestinationDescription = "International airport of Budapest", DestinationLatitude = 42.234444f, DestinationLongitude = 39.100010f },
|
||||
// new() { DestinationId = 6, DestinationName = "Margaret Island", DestinationDescription = "International airport of Budapest", DestinationLatitude = 42.234444f, DestinationLongitude = 39.100010f }
|
||||
|
||||
};
|
||||
//};
|
||||
|
||||
private readonly TransferDestinationDbContext _transferDestinationDbContext;
|
||||
private readonly ILogger<TransferDataAPIController> _logger;
|
||||
|
||||
public TransferDataAPIController(ILogger<TransferDataAPIController> logger)
|
||||
public TransferDataAPIController(ILogger<TransferDataAPIController> logger, TransferDestinationDbContext transferDestinationDbContext)
|
||||
{
|
||||
_logger = logger;
|
||||
_transferDestinationDbContext = transferDestinationDbContext;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public IEnumerable<TransferDestination> Get()
|
||||
public async Task<IEnumerable<TransferDestination>> Get()
|
||||
{
|
||||
return Enumerable.Range(1, 5).Select(index => Names[Random.Shared.Next(Names.Length)]).ToArray();
|
||||
//return new JsonResult(await _transferDestinationDbContext.TransferDestinations.ToListAsync());
|
||||
|
||||
var result = await _transferDestinationDbContext.TransferDestinations.ToListAsync();
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,11 @@
|
|||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.ResponseCompression;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using TIAM.Entities.TransferDestinations;
|
||||
using TIAM.Database.DbContexts;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
|
|
@ -7,6 +13,7 @@ var builder = WebApplication.CreateBuilder(args);
|
|||
|
||||
builder.Services.AddControllersWithViews();
|
||||
builder.Services.AddRazorPages();
|
||||
builder.Services.AddDbContext<TransferDestinationDbContext>(options => options.UseSqlServer(builder.Configuration.GetConnectionString("DeveloperDbConnection")));;
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
|
|
|
|||
|
|
@ -9,12 +9,40 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="GoogleApi" Version="5.2.4" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="7.0.10" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.13" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\TIAM.Database\TIAM.Database.csproj" />
|
||||
<ProjectReference Include="..\..\TIAM.Entities.Server\TIAM.Entities.Server.csproj" />
|
||||
<ProjectReference Include="..\..\TIAM.Entities\TIAM.Entities.csproj" />
|
||||
<ProjectReference Include="..\Client\TIAMWebApp.Client.csproj" />
|
||||
<ProjectReference Include="..\Shared\TIAMWebApp.Shared.Application.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="AyCode.Core">
|
||||
<HintPath>..\..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Core.Server">
|
||||
<HintPath>..\..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Core.Server.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Database">
|
||||
<HintPath>..\..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Database.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Entities">
|
||||
<HintPath>..\..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Entities.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Entities.Server">
|
||||
<HintPath>..\..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Entities.Server.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Interfaces">
|
||||
<HintPath>..\..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Interfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Interfaces.Server">
|
||||
<HintPath>..\..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Interfaces.Server.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
{
|
||||
"ConnectionStrings": {
|
||||
"DeveloperDbConnection": "Data Source=185.51.190.197;Initial Catalog=TIAM_DEV;Trusted_Connection=False;Connect Timeout=200;User ID=Anata_Development_Team;Password=v6f_?xNfg9N1;MultipleActiveResultSets=true"
|
||||
},
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using TIAMWebApp.Shared.Application.Models;
|
||||
using TIAM.Entities.TransferDestinations;
|
||||
using TIAMWebApp.Shared.Application.Models;
|
||||
|
||||
namespace TIAMWebApp.Shared.Application.Interfaces
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,43 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace TIAMWebApp.Shared.Application.Models
|
||||
{
|
||||
[Table("TransferDestinations")]
|
||||
public class TransferDestination
|
||||
{
|
||||
public int DestinationId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public string DestinationName
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public string DestinationDescription
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public float DestinationLongitude
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public float DestinationLatitude
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -13,4 +13,31 @@
|
|||
<ItemGroup>
|
||||
<Folder Include="Models\DTO\" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\TIAM.Database\TIAM.Database.csproj" />
|
||||
<ProjectReference Include="..\..\TIAM.Entities.Server\TIAM.Entities.Server.csproj" />
|
||||
<ProjectReference Include="..\..\TIAM.Entities\TIAM.Entities.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="AyCode.Core">
|
||||
<HintPath>..\..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Core.Server">
|
||||
<HintPath>..\..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Core.Server.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Entities">
|
||||
<HintPath>..\..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Entities.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Entities.Server">
|
||||
<HintPath>..\..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Entities.Server.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Interfaces">
|
||||
<HintPath>..\..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Interfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Interfaces.Server">
|
||||
<HintPath>..\..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Interfaces.Server.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -13,6 +13,14 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TIAMMobileApp", "TIAMMobile
|
|||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TIAMSharedUI", "TIAMSharedUI\TIAMSharedUI.csproj", "{3A24B495-45C4-4B38-B5C3-B1FD83490764}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TIAM.Database", "TIAM.Database\TIAM.Database.csproj", "{DABD68DB-9C9E-4A05-961F-3F1E4CAFB67C}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TIAM.Database.Test", "TIAM.Database.Test\TIAM.Database.Test.csproj", "{E6DD4AC5-A797-4341-8B70-E2AF647E2AE2}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TIAM.Entities", "TIAM.Entities\TIAM.Entities.csproj", "{1DAB894A-376F-4F94-BDF1-452F901941F7}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TIAM.Entities.Server", "TIAM.Entities.Server\TIAM.Entities.Server.csproj", "{BDDF5F32-D275-4BBB-9C81-8DCB1025A935}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
|
@ -41,6 +49,22 @@ Global
|
|||
{3A24B495-45C4-4B38-B5C3-B1FD83490764}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{3A24B495-45C4-4B38-B5C3-B1FD83490764}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{3A24B495-45C4-4B38-B5C3-B1FD83490764}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{DABD68DB-9C9E-4A05-961F-3F1E4CAFB67C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{DABD68DB-9C9E-4A05-961F-3F1E4CAFB67C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{DABD68DB-9C9E-4A05-961F-3F1E4CAFB67C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DABD68DB-9C9E-4A05-961F-3F1E4CAFB67C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E6DD4AC5-A797-4341-8B70-E2AF647E2AE2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E6DD4AC5-A797-4341-8B70-E2AF647E2AE2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E6DD4AC5-A797-4341-8B70-E2AF647E2AE2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E6DD4AC5-A797-4341-8B70-E2AF647E2AE2}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{1DAB894A-376F-4F94-BDF1-452F901941F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1DAB894A-376F-4F94-BDF1-452F901941F7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1DAB894A-376F-4F94-BDF1-452F901941F7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1DAB894A-376F-4F94-BDF1-452F901941F7}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{BDDF5F32-D275-4BBB-9C81-8DCB1025A935}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{BDDF5F32-D275-4BBB-9C81-8DCB1025A935}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{BDDF5F32-D275-4BBB-9C81-8DCB1025A935}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{BDDF5F32-D275-4BBB-9C81-8DCB1025A935}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
|
|||
Loading…
Reference in New Issue