Lab03: create AccountContracts project
This commit is contained in:
parent
35bc837d82
commit
bfa38fafb0
@ -3,9 +3,15 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.3.32825.248
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AbazovAppView", "AbazovAppView\AbazovAppView.csproj", "{D7EF43DC-2F09-4EAD-8161-6D4A08BC7786}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AbazovAppView", "AbazovAppView\AbazovAppView.csproj", "{D7EF43DC-2F09-4EAD-8161-6D4A08BC7786}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AbazovViewComponents", "AbazovViewComponents\AbazovViewComponents.csproj", "{070AAA71-3C9B-4E19-A89D-83372C630C6E}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AbazovViewComponents", "AbazovViewComponents\AbazovViewComponents.csproj", "{070AAA71-3C9B-4E19-A89D-83372C630C6E}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AccountsApp", "AccountsApp\AccountsApp.csproj", "{AFCB57A0-4332-4C32-9FB1-60548F7D7276}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AccountsDataModels", "AccountsDataModels\AccountsDataModels.csproj", "{31DEDC68-889D-427B-ADDE-60F2ADE2C596}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AccountsContracts", "AccountsContracts\AccountsContracts.csproj", "{CDA8B86A-9645-4D83-92D0-C8D2D85B734F}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@ -21,6 +27,18 @@ Global
|
||||
{070AAA71-3C9B-4E19-A89D-83372C630C6E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{070AAA71-3C9B-4E19-A89D-83372C630C6E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{070AAA71-3C9B-4E19-A89D-83372C630C6E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{AFCB57A0-4332-4C32-9FB1-60548F7D7276}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{AFCB57A0-4332-4C32-9FB1-60548F7D7276}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{AFCB57A0-4332-4C32-9FB1-60548F7D7276}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{AFCB57A0-4332-4C32-9FB1-60548F7D7276}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{31DEDC68-889D-427B-ADDE-60F2ADE2C596}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{31DEDC68-889D-427B-ADDE-60F2ADE2C596}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{31DEDC68-889D-427B-ADDE-60F2ADE2C596}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{31DEDC68-889D-427B-ADDE-60F2ADE2C596}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{CDA8B86A-9645-4D83-92D0-C8D2D85B734F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{CDA8B86A-9645-4D83-92D0-C8D2D85B734F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{CDA8B86A-9645-4D83-92D0-C8D2D85B734F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{CDA8B86A-9645-4D83-92D0-C8D2D85B734F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
13
AbazovApp/AccountsContracts/AccountsContracts.csproj
Normal file
13
AbazovApp/AccountsContracts/AccountsContracts.csproj
Normal file
@ -0,0 +1,13 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\AccountsDataModels\AccountsDataModels.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -0,0 +1,20 @@
|
||||
using AccountsDataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AccountsContracts.BindingModels
|
||||
{
|
||||
public class AccountBindingModel : IAccountModel
|
||||
{
|
||||
public string Login { get; set; } = string.Empty;
|
||||
|
||||
public string Password { get; set; } = string.Empty;
|
||||
|
||||
public string Email { get; set; } = string.Empty;
|
||||
|
||||
public int Id { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
using AccountsDataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AccountsContracts.BindingModels
|
||||
{
|
||||
public class InterestBindingModel : IInterestModel
|
||||
{
|
||||
public string Name { get; set;} = String.Empty;
|
||||
|
||||
public int Id { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
using AccountsContracts.BindingModels;
|
||||
using AccountsContracts.SearchModels;
|
||||
using AccountsContracts.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AccountsContracts.BusinessLogicContracts
|
||||
{
|
||||
public interface IAccountLogic
|
||||
{
|
||||
List<AccountViewModel>? ReadList(AccountSearchModel? model);
|
||||
AccountViewModel? ReadElement(AccountSearchModel model);
|
||||
bool Create(AccountBindingModel model);
|
||||
bool Update(AccountBindingModel model);
|
||||
bool Delete(AccountBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
using AccountsContracts.BindingModels;
|
||||
using AccountsContracts.SearchModels;
|
||||
using AccountsContracts.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AccountsContracts.BusinessLogicContracts
|
||||
{
|
||||
public interface IInterestLogic
|
||||
{
|
||||
List<InterestViewModel>? ReadList(InterestSearchModel? model);
|
||||
InterestViewModel? ReadElement(InterestSearchModel model);
|
||||
bool Create(InterestBindingModel model);
|
||||
bool Update(InterestBindingModel model);
|
||||
bool Delete(InterestBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AccountsContracts.SearchModels
|
||||
{
|
||||
public class AccountSearchModel
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AccountsContracts.SearchModels
|
||||
{
|
||||
public class InterestSearchModel
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
using AccountsContracts.BindingModels;
|
||||
using AccountsContracts.SearchModels;
|
||||
using AccountsContracts.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AccountsContracts.StorageContracts
|
||||
{
|
||||
public interface IAccountStrorage
|
||||
{
|
||||
List<AccountViewModel> GetFullList();
|
||||
List<AccountViewModel> GetFilteredList(AccountSearchModel model);
|
||||
AccountViewModel? GetElement(AccountSearchModel model);
|
||||
AccountViewModel? Insert(AccountBindingModel model);
|
||||
AccountViewModel? Update(AccountBindingModel model);
|
||||
AccountViewModel? Delete(AccountBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
using AccountsContracts.BindingModels;
|
||||
using AccountsContracts.SearchModels;
|
||||
using AccountsContracts.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AccountsContracts.StorageContracts
|
||||
{
|
||||
public interface IInterestModel
|
||||
{
|
||||
List<InterestViewModel> GetFullList();
|
||||
List<InterestViewModel> GetFilteredList(InterestSearchModel model);
|
||||
InterestViewModel? GetElement(InterestSearchModel model);
|
||||
InterestViewModel? Insert(InterestBindingModel model);
|
||||
InterestViewModel? Update(InterestBindingModel model);
|
||||
InterestViewModel? Delete(InterestBindingModel model);
|
||||
}
|
||||
}
|
21
AbazovApp/AccountsContracts/ViewModels/AccountViewModel.cs
Normal file
21
AbazovApp/AccountsContracts/ViewModels/AccountViewModel.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using AccountsDataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AccountsContracts.ViewModels
|
||||
{
|
||||
public class AccountViewModel : IAccountModel
|
||||
{
|
||||
[DisplayName("Почта")]
|
||||
public string Login { get; set; } = string.Empty;
|
||||
[DisplayName("Пароль")]
|
||||
public string Password { get; set; } = string.Empty;
|
||||
[DisplayName("Электронная почта")]
|
||||
public string Email { get; set; } = string.Empty;
|
||||
public int Id { get; set; }
|
||||
}
|
||||
}
|
17
AbazovApp/AccountsContracts/ViewModels/InterestViewModel.cs
Normal file
17
AbazovApp/AccountsContracts/ViewModels/InterestViewModel.cs
Normal file
@ -0,0 +1,17 @@
|
||||
using AccountsDataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AccountsContracts.ViewModels
|
||||
{
|
||||
public class InterestViewModel : IInterestModel
|
||||
{
|
||||
[DisplayName("Название")]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public int Id { get; set; }
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user