Interktion im WPF erweitert
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
using DaSaSo.Domain.Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DaSaSo.Domain.Services.BuildingsiteServices
|
||||
{
|
||||
public class BuildingsiteService : IBuildingsiteService
|
||||
{
|
||||
private readonly IDataService<Project> _projectService;
|
||||
|
||||
public BuildingsiteService(IDataService<Project> projectService)
|
||||
{
|
||||
_projectService = projectService;
|
||||
}
|
||||
|
||||
public async Task<Buildingsite> CreateBuildingsite(Project proj)
|
||||
{
|
||||
Buildingsite buildingsite = new Buildingsite()
|
||||
{
|
||||
Project = proj
|
||||
};
|
||||
proj.BuildingSites.Add(buildingsite);
|
||||
await _projectService.Update(proj.Id, proj);
|
||||
return buildingsite;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user