public async Task <ServiceEntity> Add(ServiceEntity entity) { await _coworkingDBContext.Services.AddAsync(entity); await _coworkingDBContext.SaveChangesAsync(); return(entity); }
public async Task <AdminEntity> Add(AdminEntity entity) { // await _coworkingDBContext.Admins.AddAsync(entity); _coworkingDBContext.Admins.Add(entity); await _coworkingDBContext.SaveChangesAsync(); return(entity); }
public async Task <UserEntity> Add(UserEntity entity) { await _coworkingDBContext.Users.AddAsync(entity); await _coworkingDBContext.SaveChangesAsync(); return(entity); }
public async Task <Offices2RoomsEntity> Add(Offices2RoomsEntity entity) { await _coworkingDBContext.Offices2Rooms.AddAsync(entity); await _coworkingDBContext.SaveChangesAsync(); return(entity); }
public async Task <RoomEntity> Add(RoomEntity entity) { await _coworkingDBContext.Rooms.AddAsync(entity); await _coworkingDBContext.SaveChangesAsync(); return(entity); }
public async Task <BookingEntity> Add(BookingEntity entity) { await _coworkingDBContext.Bookings.AddAsync(entity); await _coworkingDBContext.SaveChangesAsync(); return(entity); }
public async Task <RoomEntity> Update(int idEntity, RoomEntity updateEnt) { var entity = await Get(idEntity); entity.Name = updateEnt.Name; _coworkingDBContext.Rooms.Update(entity); await _coworkingDBContext.SaveChangesAsync(); return(entity); }
public async Task <BookingEntity> Update(int idEntity, BookingEntity updateEnt) { var entity = await Get(idEntity); entity.RentWorkSpace = updateEnt.RentWorkSpace; _coworkingDBContext.Bookings.Update(entity); await _coworkingDBContext.SaveChangesAsync(); return(entity); }