Контракты закончены

This commit is contained in:
Kirill 2024-04-30 16:11:58 +04:00
parent 550ec77222
commit 0434c5f14c
13 changed files with 168 additions and 9 deletions

View File

@ -7,7 +7,7 @@ using System.Threading.Tasks;
namespace SchoolContracts.BindingModels
{
internal class AchievementBindingModel : IAchievementModel
public class AchievementBindingModel : IAchievementModel
{
public int Id { get; set; }
public int LessonId { get; set; }

View File

@ -0,0 +1,20 @@
using SchoolContracts.BindingModels;
using SchoolContracts.SearchModels;
using SchoolContracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SchoolContracts.BusinessLogicsContracts
{
public interface IAchievementLogic
{
List<AchievementViewModel>? ReadList(AchievementSearchModel? model);
AchievementViewModel? ReadElement(AchievementSearchModel model);
bool Create(AchievementBindingModel model);
bool Update(AchievementBindingModel model);
bool Delete(AchievementBindingModel model);
}
}

View File

@ -0,0 +1,20 @@
using SchoolContracts.BindingModels;
using SchoolContracts.SearchModels;
using SchoolContracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SchoolContracts.BusinessLogicsContracts
{
public interface IInterestLogic
{
List<InterestViewModel>? ReadList(InterestSearchModel? model);
InterestViewModel? ReadElement(InterestSearchModel model);
bool Create(InterestBindingModel model);
bool Update(InterestBindingModel model);
bool Delete(InterestBindingModel model);
}
}

View File

@ -0,0 +1,20 @@
using SchoolContracts.BindingModels;
using SchoolContracts.SearchModels;
using SchoolContracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SchoolContracts.BusinessLogicsContracts
{
public interface ILessonLogic
{
List<LessonViewModel>? ReadList(LessonSearchModel? model);
LessonViewModel? ReadElement(LessonSearchModel model);
bool Create(LessonBindingModel model);
bool Update(LessonBindingModel model);
bool Delete(LessonBindingModel model);
}
}

View File

@ -0,0 +1,20 @@
using SchoolContracts.BindingModels;
using SchoolContracts.SearchModels;
using SchoolContracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SchoolContracts.BusinessLogicsContracts
{
public interface IUserLogic
{
List<UserViewModel>? ReadList(UserSearchModel? model);
UserViewModel? ReadElement(UserSearchModel model);
bool Create(UserBindingModel model);
bool Update(UserBindingModel model);
bool Delete(UserBindingModel model);
}
}

View File

@ -10,9 +10,4 @@
<ProjectReference Include="..\SchoolsDataModels\SchoolDataModels.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="BusinessLogicsContracts\" />
<Folder Include="StoragesContracts\" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,21 @@
using SchoolContracts.BindingModels;
using SchoolContracts.SearchModels;
using SchoolContracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SchoolContracts.StoragesContracts
{
public interface IAchievementStorage
{
List<AchievementViewModel> GetFullList();
List<AchievementViewModel> GetFilteredList(AchievementSearchModel model);
AchievementViewModel? GetElement(AchievementSearchModel model);
AchievementViewModel? Insert(AchievementBindingModel model);
AchievementViewModel? Update(AchievementBindingModel model);
AchievementViewModel? Delete(AchievementBindingModel model);
}
}

View File

@ -0,0 +1,21 @@
using SchoolContracts.BindingModels;
using SchoolContracts.SearchModels;
using SchoolContracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SchoolContracts.StoragesContracts
{
public interface IInterestStorage
{
List<InterestViewModel> GetFullList();
List<InterestViewModel> GetFilteredList(InterestSearchModel model);
InterestViewModel? GetElement(InterestSearchModel model);
InterestViewModel? Insert(InterestBindingModel model);
InterestViewModel? Update(InterestBindingModel model);
InterestViewModel? Delete(InterestBindingModel model);
}
}

View File

@ -0,0 +1,21 @@
using SchoolContracts.BindingModels;
using SchoolContracts.SearchModels;
using SchoolContracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SchoolContracts.StoragesContracts
{
public interface ILessonStorage
{
List<LessonViewModel> GetFullList();
List<LessonViewModel> GetFilteredList(LessonSearchModel model);
LessonViewModel? GetElement(LessonSearchModel model);
LessonViewModel? Insert(LessonBindingModel model);
LessonViewModel? Update(LessonBindingModel model);
LessonViewModel? Delete(LessonBindingModel model);
}
}

View File

@ -0,0 +1,21 @@
using SchoolContracts.BindingModels;
using SchoolContracts.SearchModels;
using SchoolContracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SchoolContracts.StoragesContracts
{
public interface IUserStorage
{
List<UserViewModel> GetFullList();
List<UserViewModel> GetFilteredList(UserSearchModel model);
UserViewModel? GetElement(UserSearchModel model);
UserViewModel? Insert(UserBindingModel model);
UserViewModel? Update(UserBindingModel model);
UserViewModel? Delete(UserBindingModel model);
}
}

View File

@ -8,7 +8,7 @@ using System.ComponentModel;
namespace SchoolContracts.ViewModels
{
internal class AchievementViewModel : IAchievementModel
public class AchievementViewModel : IAchievementModel
{
public int Id { get; set; }
public int LessonId { get; set; }

View File

@ -8,7 +8,7 @@ using System.ComponentModel;
namespace SchoolContracts.ViewModels
{
internal class LessonViewModel : ILessonModel
public class LessonViewModel : ILessonModel
{
public int Id { get; set; }
public int UserId { get; set; }

View File

@ -8,7 +8,7 @@ using System.ComponentModel;
namespace SchoolContracts.ViewModels
{
internal class UserViewModel : IUserModel
public class UserViewModel : IUserModel
{
public int Id { get; set; }
[DisplayName("Имя пользователя")]