Контракты done (да начнется жесть)
This commit is contained in:
parent
ddea13b484
commit
60b97aeebb
@ -7,7 +7,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace BlogContracts.BindingModel
|
||||
{
|
||||
public class NewsBindinModel : INews
|
||||
public class NewsBindingModel : INews
|
||||
{
|
||||
public string Title { get; set; } = string.Empty;
|
||||
|
@ -6,11 +6,6 @@
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="BusinessLogicContracts\" />
|
||||
<Folder Include="StorageContracts\" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\BlogDataModels\BlogDataModels.csproj" />
|
||||
</ItemGroup>
|
||||
|
@ -0,0 +1,20 @@
|
||||
using BlogContracts.BindingModel;
|
||||
using BlogContracts.SearchModels;
|
||||
using BlogContracts.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BlogContracts.BusinessLogicContracts
|
||||
{
|
||||
public interface ICommentLogic
|
||||
{
|
||||
List<CommentViewModel>? ReadList(CommentSearchModel? model);
|
||||
CommentViewModel? ReadElement(CommentSearchModel model);
|
||||
bool Create(CommentBindingModel model);
|
||||
bool Update(CommentBindingModel model);
|
||||
bool Delete(CommentBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
using BlogContracts.BindingModel;
|
||||
using BlogContracts.SearchModels;
|
||||
using BlogContracts.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BlogContracts.BusinessLogicContracts
|
||||
{
|
||||
public interface INewsLogic
|
||||
{
|
||||
List<NewsViewModel>? ReadList(NewsSearchModel? model);
|
||||
NewsViewModel? ReadElement(NewsSearchModel model);
|
||||
bool Create(NewsBindingModel model);
|
||||
bool Update(NewsBindingModel model);
|
||||
bool Delete(NewsBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
using BlogContracts.BindingModel;
|
||||
using BlogContracts.SearchModels;
|
||||
using BlogContracts.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BlogContracts.BusinessLogicContracts
|
||||
{
|
||||
public interface ITagLogic
|
||||
{
|
||||
List<TagViewModel>? ReadList(TagSearchModel? model);
|
||||
TagViewModel? ReadElement(TagSearchModel model);
|
||||
bool Create(TagBindingModel model);
|
||||
bool Update(TagBindingModel model);
|
||||
bool Delete(TagBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
using BlogContracts.BindingModel;
|
||||
using BlogContracts.SearchModels;
|
||||
using BlogContracts.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BlogContracts.BusinessLogicContracts
|
||||
{
|
||||
public interface IUserLogic
|
||||
{
|
||||
List<UserViewModel>? ReadList(UserSearchModel? model);
|
||||
UserViewModel? ReadElement(UserSearchModel model);
|
||||
bool Create(UserBindingModel model);
|
||||
bool Update(UserBindingModel model);
|
||||
bool Delete(UserBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
using BlogContracts.BindingModel;
|
||||
using BlogContracts.SearchModels;
|
||||
using BlogContracts.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BlogContracts.StorageContracts
|
||||
{
|
||||
public interface ICommentStorage
|
||||
{
|
||||
List<CommentViewModel> GetFullList();
|
||||
List<CommentViewModel> GetFilteredList(CommentSearchModel model);
|
||||
CommentViewModel? GetElement(CommentSearchModel model);
|
||||
CommentViewModel? Insert(CommentBindingModel model);
|
||||
CommentViewModel? Update(CommentBindingModel model);
|
||||
CommentViewModel? Delete(CommentBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
using BlogContracts.BindingModel;
|
||||
using BlogContracts.SearchModels;
|
||||
using BlogContracts.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BlogContracts.StorageContracts
|
||||
{
|
||||
public interface INewsStorage
|
||||
{
|
||||
List<NewsViewModel> GetFullList();
|
||||
List<NewsViewModel> GetFilteredList(NewsSearchModel model);
|
||||
NewsViewModel? GetElement(NewsSearchModel model);
|
||||
NewsViewModel? Insert(NewsBindingModel model);
|
||||
NewsViewModel? Update(NewsBindingModel model);
|
||||
NewsViewModel? Delete(NewsBindingModel model);
|
||||
}
|
||||
}
|
21
BlogDataModels/BlogContracts/StorageContracts/ITagStorage.cs
Normal file
21
BlogDataModels/BlogContracts/StorageContracts/ITagStorage.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using BlogContracts.BindingModel;
|
||||
using BlogContracts.SearchModels;
|
||||
using BlogContracts.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BlogContracts.StorageContracts
|
||||
{
|
||||
public interface ITagStorage
|
||||
{
|
||||
List<TagViewModel> GetFullList();
|
||||
List<TagViewModel> GetFilteredList(TagSearchModel model);
|
||||
TagViewModel? GetElement(TagSearchModel model);
|
||||
TagViewModel? Insert(TagBindingModel model);
|
||||
TagViewModel? Update(TagBindingModel model);
|
||||
TagViewModel? Delete(TagBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
using BlogContracts.BindingModel;
|
||||
using BlogContracts.SearchModels;
|
||||
using BlogContracts.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BlogContracts.StorageContracts
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user