мелкие удаления
This commit is contained in:
parent
d2940f2486
commit
a3f807566b
@ -19,7 +19,6 @@ namespace BeautySalonDatabaseImplement.Implements
|
||||
using var context = new BeautySalonDatabase();
|
||||
return context.Evaluations
|
||||
.Include(x => x.Procedure)
|
||||
.Include(x => x.Client)
|
||||
.ToList()
|
||||
.Select(x => x.GetViewModel)
|
||||
.ToList();
|
||||
@ -31,8 +30,7 @@ namespace BeautySalonDatabaseImplement.Implements
|
||||
if (model.Id.HasValue)
|
||||
{
|
||||
return context.Evaluations
|
||||
.Include(x => x.Procedure)
|
||||
.Include(x => x.Client)
|
||||
.Include(x => x.Procedure)
|
||||
.Where(x => x.Id == model.Id)
|
||||
.Select(x => x.GetViewModel)
|
||||
.ToList();
|
||||
@ -41,7 +39,6 @@ namespace BeautySalonDatabaseImplement.Implements
|
||||
{
|
||||
return context.Evaluations
|
||||
.Include(x => x.Procedure)
|
||||
.Include(x => x.Client)
|
||||
.Where(x => x.ClientId == model.ClientId)
|
||||
.Select(x => x.GetViewModel)
|
||||
.ToList();
|
||||
@ -58,7 +55,6 @@ namespace BeautySalonDatabaseImplement.Implements
|
||||
using var context = new BeautySalonDatabase();
|
||||
return context.Evaluations
|
||||
.Include(x => x.Procedure)
|
||||
.Include(x => x.Client)
|
||||
.FirstOrDefault(x => model.Id.HasValue && x.Id == model.Id)
|
||||
?.GetViewModel;
|
||||
}
|
||||
@ -75,7 +71,6 @@ namespace BeautySalonDatabaseImplement.Implements
|
||||
context.SaveChanges();
|
||||
return context.Evaluations
|
||||
.Include(x => x.Procedure)
|
||||
.Include(x => x.Client)
|
||||
.FirstOrDefault(x => x.Id == newRating.Id)
|
||||
?.GetViewModel;
|
||||
}
|
||||
@ -85,7 +80,6 @@ namespace BeautySalonDatabaseImplement.Implements
|
||||
using var context = new BeautySalonDatabase();
|
||||
var сosmetic = context.Evaluations
|
||||
.Include(x => x.Procedure)
|
||||
.Include(x => x.Client)
|
||||
.FirstOrDefault(x => x.Id == model.Id);
|
||||
if (сosmetic == null)
|
||||
{
|
||||
@ -101,7 +95,6 @@ namespace BeautySalonDatabaseImplement.Implements
|
||||
using var context = new BeautySalonDatabase();
|
||||
var element = context.Evaluations
|
||||
.Include(x => x.Procedure)
|
||||
.Include(x => x.Client)
|
||||
.FirstOrDefault(rec => rec.Id == model.Id);
|
||||
if (element != null)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user