54 lines
1.5 KiB
C#
54 lines
1.5 KiB
C#
using DaSaSo.Domain.Model;
|
|
using DaSaSo.Domain.Services;
|
|
using DaSaSo.EntityFramework.Services.Common;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace DaSaSo.EntityFramework.Services
|
|
{
|
|
public class SewerpointDataService : IDataService<SewerPoint>
|
|
{
|
|
private readonly DaSaSoDbContextFactory _contextFactory;
|
|
private readonly NonQueryDataService<SewerPoint> _nonQueryDataService;
|
|
|
|
public SewerpointDataService(DaSaSoDbContextFactory contextFactory)
|
|
{
|
|
_contextFactory = contextFactory;
|
|
_nonQueryDataService = new NonQueryDataService<SewerPoint>(contextFactory);
|
|
}
|
|
|
|
public async Task<SewerPoint> Create(SewerPoint entity)
|
|
{
|
|
return await _nonQueryDataService.Create(entity);
|
|
}
|
|
|
|
public SewerPoint CreateNonAsync(SewerPoint entity)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
public async Task<bool> Delete(int id)
|
|
{
|
|
return await _nonQueryDataService.Delete(id);
|
|
}
|
|
|
|
public Task<SewerPoint> Get(int id)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
public Task<IEnumerable<SewerPoint>> GetAll()
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
public async Task<SewerPoint> Update(int id, SewerPoint entity)
|
|
{
|
|
return await _nonQueryDataService.Update(id, entity);
|
|
}
|
|
}
|
|
}
|