все еще плаки плаки(

This commit is contained in:
ChaZIR 2024-04-30 20:41:07 +04:00
parent c751e67f1b
commit efabcbc55f
7 changed files with 13 additions and 2 deletions

View File

@ -14,5 +14,6 @@ namespace TravelCompanyContracts.BindingModels.Contractor
public string ExcursionGroupName { get; set; } = string.Empty;
public int PeopleAmount { get; set; }
public int ContractorID { get; set; }
public Dictionary<int, ITourModel> ExcursionGroupTours { get; set; } = new();
}
}

View File

@ -16,5 +16,6 @@ namespace TravelCompanyContracts.ViewModels.Contractor.ViewModels
[DisplayName("Количество людей")]
public int PeopleAmount { get; set; }
public int ContractorID { get; set; }
public Dictionary<int, ITourModel> ExcursionGroupTours { get; set; } = new();
}
}

View File

@ -11,5 +11,6 @@ namespace TravelCompanyDataModels.Models.Contractor
string ExcursionGroupName { get; }
int PeopleAmount { get; }
int ContractorID { get; }
Dictionary<int, ITourModel> ExcursionGroupTours { get; }
}
}

View File

@ -4,10 +4,12 @@ using System.Diagnostics.Contracts;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using TravelCompanyContracts.BindingModels.Contractor;
using TravelCompanyContracts.SearchModels.Contractor;
using TravelCompanyContracts.StoragesModels.Contractor;
using TravelCompanyContracts.ViewModels.Contractor.ViewModels;
using TravelCompanyDatabaseImplement.Models.ContractorModels;
namespace TravelCompanyDatabaseImplement.Implements.ContractorImplements
{

View File

@ -3,10 +3,12 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using TravelCompanyContracts.BindingModels.Contractor;
using TravelCompanyContracts.SearchModels.Contractor;
using TravelCompanyContracts.StoragesModels.Contractor;
using TravelCompanyContracts.ViewModels.Contractor.ViewModels;
using TravelCompanyDatabaseImplement.Models.ContractorModels;
namespace TravelCompanyDatabaseImplement.Implements.ContractorImplements
{
@ -37,7 +39,7 @@ namespace TravelCompanyDatabaseImplement.Implements.ContractorImplements
{
return context.ExcursionGroups
.Include(x => x.Contractor)
.Where(x => x.UserId.Equals(model.ContractorID))
.Where(x => x.ContractorID.Equals(model.ContractorID))
.ToList()
.Select(x => x.GetViewModel)
.ToList();

View File

@ -3,10 +3,12 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using TravelCompanyContracts.BindingModels.Contractor;
using TravelCompanyContracts.SearchModels.Contractor;
using TravelCompanyContracts.StoragesModels.Contractor;
using TravelCompanyContracts.ViewModels.Contractor.ViewModels;
using TravelCompanyDatabaseImplement.Models.ContractorModels;
namespace TravelCompanyDatabaseImplement.Implements.ContractorImplements
{

View File

@ -3,10 +3,12 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using TravelCompanyContracts.BindingModels.Contractor;
using TravelCompanyContracts.SearchModels.Contractor;
using TravelCompanyContracts.StoragesModels.Contractor;
using TravelCompanyContracts.ViewModels.Contractor.ViewModels;
using TravelCompanyDatabaseImplement.Models.ContractorModels;
namespace TravelCompanyDatabaseImplement.Implements.ContractorImplements
{
@ -36,7 +38,7 @@ namespace TravelCompanyDatabaseImplement.Implements.ContractorImplements
{
return context.Tours
.Include(x => x.Contractor)
.Where(x => x.UserId.Equals(model.ContractorID))
.Where(x => x.ContractorID.Equals(model.ContractorID))
.Select(x => x.GetViewModel)
.ToList();
}