еще изменения
This commit is contained in:
parent
eb71f7a840
commit
095d7d173f
@ -25,6 +25,7 @@ namespace BeautySalonDatabaseImplement
|
||||
public virtual DbSet<LaborCosts> LaborCosts { set; get; }
|
||||
public virtual DbSet<Cosmetic> Cosmetics { set; get; }
|
||||
public virtual DbSet<Service> Services { set; get; }
|
||||
public virtual DbSet<Evaluation> Evaluations { set; get; }
|
||||
public virtual DbSet<Procedure> Procedures { set; get; }
|
||||
public virtual DbSet<ServiceCosmetic> ServiceCosmetics { set; get; }
|
||||
public virtual DbSet<StaffMember> StaffMembers { set; get; }
|
||||
|
@ -55,7 +55,7 @@ namespace BeautySalonDatabaseImplement.Implements
|
||||
public List<LaborCostsViewModel> GetFullList()
|
||||
{
|
||||
using var context = new BeautySalonDatabase();
|
||||
return context.LaborCostss
|
||||
return context.LaborCosts
|
||||
.Select(x => x.GetViewModel)
|
||||
.ToList();
|
||||
}
|
||||
@ -71,7 +71,7 @@ namespace BeautySalonDatabaseImplement.Implements
|
||||
return null;
|
||||
}
|
||||
|
||||
context.LaborCostss.Add(newLaborCosts);
|
||||
context.LaborCosts.Add(newLaborCosts);
|
||||
context.SaveChanges();
|
||||
|
||||
return newLaborCosts.GetViewModel;
|
||||
@ -81,7 +81,7 @@ namespace BeautySalonDatabaseImplement.Implements
|
||||
{
|
||||
using var context = new BeautySalonDatabase();
|
||||
|
||||
var LaborCosts = context.LaborCostss.FirstOrDefault(x => x.Id == model.Id);
|
||||
var LaborCosts = context.LaborCosts.FirstOrDefault(x => x.Id == model.Id);
|
||||
|
||||
if (LaborCosts == null)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user