using Arch.EntityFrameworkCore.UnitOfWork; using WorkStation.Server.Context.Entity; using WorkStation.Share; namespace WorkStation.Server.Services { public class UserService(IUnitOfWork unitOfWork) : IUserService { private IUnitOfWork _unitOfWork = unitOfWork; public async Task AddAsync(User item) { var repository = _unitOfWork.GetRepository(); await repository.InsertAsync(item); var count = await _unitOfWork.SaveChangesAsync(); return new ApiResponse(true, "添加数据", count); } public Task DelateAsync(int id) { throw new NotImplementedException(); } public Task GetAllAsync() { throw new NotImplementedException(); } public Task GetByIdAsync(int id) { throw new NotImplementedException(); } public Task UpdateAsync(User item) { throw new NotImplementedException(); } } }