diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..3c4efe20 --- /dev/null +++ b/.gitignore @@ -0,0 +1,261 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# DNX +project.lock.json +project.fragment.lock.json +artifacts/ + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# TODO: Comment the next line if you want to checkin your web deploy settings +# but database connection strings (with potential passwords) will be unencrypted +#*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config +# NuGet v3's project.json files produces more ignoreable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +node_modules/ +orleans.codegen.cs + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc \ No newline at end of file diff --git a/TIAM.Database.Test/DatabaseTest.cs b/TIAM.Database.Test/DatabaseTest.cs new file mode 100644 index 00000000..048323b9 --- /dev/null +++ b/TIAM.Database.Test/DatabaseTest.cs @@ -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); + } + } +} \ No newline at end of file diff --git a/TIAM.Database.Test/GlobalUsings.cs b/TIAM.Database.Test/GlobalUsings.cs new file mode 100644 index 00000000..ab67c7ea --- /dev/null +++ b/TIAM.Database.Test/GlobalUsings.cs @@ -0,0 +1 @@ +global using Microsoft.VisualStudio.TestTools.UnitTesting; \ No newline at end of file diff --git a/TIAM.Database.Test/TIAM.Database.Test.csproj b/TIAM.Database.Test/TIAM.Database.Test.csproj new file mode 100644 index 00000000..7b3cce2c --- /dev/null +++ b/TIAM.Database.Test/TIAM.Database.Test.csproj @@ -0,0 +1,52 @@ + + + + net7.0 + enable + enable + + false + true + + + + + + + + + + + + + + + + + + + + + ..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Core.dll + + + ..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Core.Server.dll + + + ..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Database.dll + + + ..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Entities.dll + + + ..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Entities.Server.dll + + + ..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Interfaces.dll + + + ..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Interfaces.Server.dll + + + + diff --git a/TIAM.Database/DataLayers/TransferDestinations/TransferDestinationDal.cs b/TIAM.Database/DataLayers/TransferDestinations/TransferDestinationDal.cs new file mode 100644 index 00000000..b80ac84c --- /dev/null +++ b/TIAM.Database/DataLayers/TransferDestinations/TransferDestinationDal.cs @@ -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 + { + } +} diff --git a/TIAM.Database/DbContexts/TiamDbContextBase.cs b/TIAM.Database/DbContexts/TiamDbContextBase.cs new file mode 100644 index 00000000..9057ee70 --- /dev/null +++ b/TIAM.Database/DbContexts/TiamDbContextBase.cs @@ -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 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); + } + } +} diff --git a/TIAM.Database/DbContexts/TransferDestinationDbContext.cs b/TIAM.Database/DbContexts/TransferDestinationDbContext.cs new file mode 100644 index 00000000..2d41381d --- /dev/null +++ b/TIAM.Database/DbContexts/TransferDestinationDbContext.cs @@ -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 TransferDestinations { get; set; } + + public TransferDestinationDbContext() + { + + } + + public TransferDestinationDbContext(string name) : base(name) + { + } + + public TransferDestinationDbContext(DbContextOptions options, string name) : base(options, name) + { + } + } +} diff --git a/TIAM.Database/TIAM.Database.csproj b/TIAM.Database/TIAM.Database.csproj new file mode 100644 index 00000000..58f5ee9b --- /dev/null +++ b/TIAM.Database/TIAM.Database.csproj @@ -0,0 +1,48 @@ + + + + net7.0 + enable + enable + + + + + + + + + + + + + + + + + + + + ..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Core.dll + + + ..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Core.Server.dll + + + ..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Database.dll + + + ..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Entities.dll + + + ..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Entities.Server.dll + + + ..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Interfaces.dll + + + ..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Interfaces.Server.dll + + + + diff --git a/TIAM.Entities.Server/TIAM.Entities.Server.csproj b/TIAM.Entities.Server/TIAM.Entities.Server.csproj new file mode 100644 index 00000000..cfadb03d --- /dev/null +++ b/TIAM.Entities.Server/TIAM.Entities.Server.csproj @@ -0,0 +1,9 @@ + + + + net7.0 + enable + enable + + + diff --git a/TIAM.Entities/TIAM.Entities.csproj b/TIAM.Entities/TIAM.Entities.csproj new file mode 100644 index 00000000..f0eba279 --- /dev/null +++ b/TIAM.Entities/TIAM.Entities.csproj @@ -0,0 +1,30 @@ + + + + net7.0 + enable + enable + + + + + ..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Core.dll + + + ..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Core.Server.dll + + + ..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Entities.dll + + + ..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Entities.Server.dll + + + ..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Interfaces.dll + + + ..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Interfaces.Server.dll + + + + diff --git a/TIAM.Entities/TransferDestinations/TransferDestination.cs b/TIAM.Entities/TransferDestinations/TransferDestination.cs new file mode 100644 index 00000000..39b3dc9a --- /dev/null +++ b/TIAM.Entities/TransferDestinations/TransferDestination.cs @@ -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; } + } +} + diff --git a/TIAMMobileApp/Services/TransferDataService.cs b/TIAMMobileApp/Services/TransferDataService.cs index fd59fb15..2c0b4719 100644 --- a/TIAMMobileApp/Services/TransferDataService.cs +++ b/TIAMMobileApp/Services/TransferDataService.cs @@ -1,4 +1,5 @@ using System.Net.Http.Json; +using TIAM.Entities.TransferDestinations; using TIAMWebApp.Shared.Application.Interfaces; using TIAMWebApp.Shared.Application.Models; diff --git a/TIAMSharedUI/Pages/ChooseDestination.cs b/TIAMSharedUI/Pages/ChooseDestination.cs index d3f94ec4..75818932 100644 --- a/TIAMSharedUI/Pages/ChooseDestination.cs +++ b/TIAMSharedUI/Pages/ChooseDestination.cs @@ -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(); } diff --git a/TIAMSharedUI/Pages/ChooseDestination.razor b/TIAMSharedUI/Pages/ChooseDestination.razor index 45f397d1..4f6fa033 100644 --- a/TIAMSharedUI/Pages/ChooseDestination.razor +++ b/TIAMSharedUI/Pages/ChooseDestination.razor @@ -13,7 +13,7 @@ else @foreach (var dest in TransferDestinations) { - + } diff --git a/TIAMSharedUI/Pages/Transfer.cs b/TIAMSharedUI/Pages/Transfer.cs index 550eb120..917f5377 100644 --- a/TIAMSharedUI/Pages/Transfer.cs +++ b/TIAMSharedUI/Pages/Transfer.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Components; +using TIAM.Entities.TransferDestinations; using TIAMWebApp.Shared.Application.Models; namespace EmployeePortal.Client.Components diff --git a/TIAMSharedUI/Pages/Transfer.razor b/TIAMSharedUI/Pages/Transfer.razor index 06ee5157..82628fe9 100644 --- a/TIAMSharedUI/Pages/Transfer.razor +++ b/TIAMSharedUI/Pages/Transfer.razor @@ -1,5 +1,7 @@ @page "/transfer" @using TIAMSharedUI.Shared +@using TIAMWebApp.Shared.Application.Interfaces +@inject ITransferDataService transferDataService Transfer @@ -58,5 +60,11 @@ } + protected override async Task OnInitializedAsync() + { + var suppliers = await transferDataService.GetDestinationsAsync(); + Console.WriteLine(string.Join("; ", suppliers.Select(x => x.Name))); + } + } diff --git a/TIAMSharedUI/Pages/User/Home.razor.cs b/TIAMSharedUI/Pages/User/Home.razor.cs new file mode 100644 index 00000000..b8ba5846 --- /dev/null +++ b/TIAMSharedUI/Pages/User/Home.razor.cs @@ -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 + { + } +} diff --git a/TIAMWebApp/Client/Services/TransferDataService.cs b/TIAMWebApp/Client/Services/TransferDataService.cs index db9ff57d..fc8f40d7 100644 --- a/TIAMWebApp/Client/Services/TransferDataService.cs +++ b/TIAMWebApp/Client/Services/TransferDataService.cs @@ -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 GetDestinationsAsync() { return http.GetFromJsonAsync("TransferDataAPI"); diff --git a/TIAMWebApp/Server/Controllers/TransferDataAPIController.cs b/TIAMWebApp/Server/Controllers/TransferDataAPIController.cs index 96c629e6..74d6d6ef 100644 --- a/TIAMWebApp/Server/Controllers/TransferDataAPIController.cs +++ b/TIAMWebApp/Server/Controllers/TransferDataAPIController.cs @@ -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 _logger; - public TransferDataAPIController(ILogger logger) + public TransferDataAPIController(ILogger logger, TransferDestinationDbContext transferDestinationDbContext) { _logger = logger; + _transferDestinationDbContext = transferDestinationDbContext; } [HttpGet] - public IEnumerable Get() + public async Task> 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; } } } \ No newline at end of file diff --git a/TIAMWebApp/Server/Program.cs b/TIAMWebApp/Server/Program.cs index 7318e4a6..c833b303 100644 --- a/TIAMWebApp/Server/Program.cs +++ b/TIAMWebApp/Server/Program.cs @@ -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(options => options.UseSqlServer(builder.Configuration.GetConnectionString("DeveloperDbConnection")));; var app = builder.Build(); diff --git a/TIAMWebApp/Server/TIAMWebApp.Server.csproj b/TIAMWebApp/Server/TIAMWebApp.Server.csproj index 3d7b2a04..81e1aebe 100644 --- a/TIAMWebApp/Server/TIAMWebApp.Server.csproj +++ b/TIAMWebApp/Server/TIAMWebApp.Server.csproj @@ -1,4 +1,4 @@ - + net7.0 @@ -8,12 +8,40 @@ + + + + + + + ..\..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Core.dll + + + ..\..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Core.Server.dll + + + ..\..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Database.dll + + + ..\..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Entities.dll + + + ..\..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Entities.Server.dll + + + ..\..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Interfaces.dll + + + ..\..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Interfaces.Server.dll + + + diff --git a/TIAMWebApp/Server/appsettings.json b/TIAMWebApp/Server/appsettings.json index 10f68b8c..a6d64f47 100644 --- a/TIAMWebApp/Server/appsettings.json +++ b/TIAMWebApp/Server/appsettings.json @@ -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", diff --git a/TIAMWebApp/Shared/Interfaces/ITransferDataService.cs b/TIAMWebApp/Shared/Interfaces/ITransferDataService.cs index 4ccad466..aa4aa35e 100644 --- a/TIAMWebApp/Shared/Interfaces/ITransferDataService.cs +++ b/TIAMWebApp/Shared/Interfaces/ITransferDataService.cs @@ -1,4 +1,5 @@ -using TIAMWebApp.Shared.Application.Models; +using TIAM.Entities.TransferDestinations; +using TIAMWebApp.Shared.Application.Models; namespace TIAMWebApp.Shared.Application.Interfaces { diff --git a/TIAMWebApp/Shared/Models/TransferDestination.cs b/TIAMWebApp/Shared/Models/TransferDestination.cs deleted file mode 100644 index b94e6de3..00000000 --- a/TIAMWebApp/Shared/Models/TransferDestination.cs +++ /dev/null @@ -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; - } - } -} - diff --git a/TIAMWebApp/Shared/TIAMWebApp.Shared.Application.csproj b/TIAMWebApp/Shared/TIAMWebApp.Shared.Application.csproj index f275be49..118af6d5 100644 --- a/TIAMWebApp/Shared/TIAMWebApp.Shared.Application.csproj +++ b/TIAMWebApp/Shared/TIAMWebApp.Shared.Application.csproj @@ -13,4 +13,31 @@ + + + + + + + + + + ..\..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Core.dll + + + ..\..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Core.Server.dll + + + ..\..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Entities.dll + + + ..\..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Entities.Server.dll + + + ..\..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Interfaces.dll + + + ..\..\..\AyCode.Core\AyCode.Database\bin\Debug\net7.0\AyCode.Interfaces.Server.dll + + diff --git a/TourIAmProject.sln b/TourIAmProject.sln index 9a40a445..ac142c52 100644 --- a/TourIAmProject.sln +++ b/TourIAmProject.sln @@ -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