binding models + BLC

This commit is contained in:
Леонид Малафеев 2024-04-23 18:37:13 +04:00
parent e82628c365
commit a9a6a716ce
19 changed files with 197 additions and 0 deletions

View File

@ -0,0 +1,19 @@
using SportCompetitionsDataModels.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SportCompetitionsContracts.BindingModels
{
public class CompetitionBindingModel : ICompetitionModel
{
public int Id { get; set; }
public string? CompetitionName { get; set; }
public DateTime CompetitionDateHolding { get; set; }
public string? CompetitionCity { get; set; }
}
}

View File

@ -0,0 +1,19 @@
using SportCompetitionsDataModels.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SportCompetitionsContracts.BindingModels
{
public class MemberBindingModel : IMemberModel
{
public int Id { get; set; }
public string? MemberFCs { get; set; }
public DateTime MemberBirthDate { get; }
public string? MemberGender { get; set; }
public int TeamId { get; set; }
}
}

View File

@ -0,0 +1,20 @@
using SportCompetitionsDataModels.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SportCompetitionsContracts.BindingModels
{
public class RecordBindingModel : IRecordModel
{
public int Id { get; set; }
public string? RecordName { get; set; }
public string? RecordDecriptiption { get; set; }
public int MemberId { get; set; }
public DateTime RecordDate { get; set; }
public int RecordValue { get; set; }
}
}

View File

@ -0,0 +1,17 @@
using SportCompetitionsDataModels.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SportCompetitionsContracts.BindingModels
{
public class ResultBindingModel : IResultModel
{
public int Id { get; set; }
public int CompetitionId { get; set; }
public int TeamId { get; set; }
public int ResultPosition { get; set; }
}
}

View File

@ -0,0 +1,17 @@
using SportCompetitionsDataModels.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SportCompetitionsContracts.BindingModels
{
public class TeamBindingModel : ITeamModel
{
public int Id { get; set; }
public string? TeamName { get; }
public string? TeamCountry { get; }
}
}

View File

@ -0,0 +1,21 @@
using SportCompetitionsContracts.BindingModels;
using SportCompetitionsContracts.SearchModels;
using SportCompetitionsContracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SportCompetitionsContracts.BusinessLogicsContracts
{
public interface ICompetitionLogic
{
List<CompetitionViewModel>? ReadList(CompetitionSearchModel? model);
CompetitionViewModel? ReadElement(CompetitionSearchModel model);
bool Create(CompetitionBindingModel model);
bool Update(CompetitionBindingModel model);
bool Delete(CompetitionBindingModel model);
}
}

View File

@ -0,0 +1,21 @@
using SportCompetitionsContracts.BindingModels;
using SportCompetitionsContracts.SearchModels;
using SportCompetitionsContracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SportCompetitionsContracts.BusinessLogicsContracts
{
public interface IMemberLogic
{
List<MemberViewModel>? ReadList(MemberSearchModel? model);
MemberViewModel? ReadElement(MemberSearchModel model);
bool Create(MemberBindingModel model);
bool Update(MemberBindingModel model);
bool Delete(MemberBindingModel model);
}
}

View File

@ -0,0 +1,21 @@
using SportCompetitionsContracts.BindingModels;
using SportCompetitionsContracts.SearchModels;
using SportCompetitionsContracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SportCompetitionsContracts.BusinessLogicsContracts
{
public interface IRecordLogic
{
List<RecordViewModel>? ReadList(RecordSearchModel? model);
RecordViewModel? ReadElement(RecordSearchModel model);
bool Create(RecordBindingModel model);
bool Update(RecordBindingModel model);
bool Delete(RecordBindingModel model);
}
}

View File

@ -0,0 +1,21 @@
using SportCompetitionsContracts.BindingModels;
using SportCompetitionsContracts.SearchModels;
using SportCompetitionsContracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SportCompetitionsContracts.BusinessLogicsContracts
{
public interface IResultLogic
{
List<ResultViewModel>? ReadList(ResultSearchModel? model);
ResultViewModel? ReadElement(ResultSearchModel model);
bool Create(ResultBindingModel model);
bool Update(ResultBindingModel model);
bool Delete(ResultBindingModel model);
}
}

View File

@ -0,0 +1,21 @@
using SportCompetitionsContracts.BindingModels;
using SportCompetitionsContracts.SearchModels;
using SportCompetitionsContracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SportCompetitionsContracts.BusinessLogicsContracts
{
public interface ITeamLogic
{
List<TeamViewModel>? ReadList(TeamSearchModel? model);
TeamViewModel? ReadElement(TeamSearchModel model);
bool Create(TeamBindingModel model);
bool Update(TeamBindingModel model);
bool Delete(TeamBindingModel model);
}
}