public bool RemoveReservation(Material material) { throw new NotImplementedException(); //material.GuestID = null; //material.StartDate = null; //material.EndDate = null; //return material; }
public bool Delete(Material entity) { var material = _materials.FirstOrDefault(e => e.ID == entity.ID); if (material == null) return false; _materials.Remove(material); return true; }
public Material AddReservation(Material material, int guestID, DateTime startDate, DateTime endDate) { material.GuestID = guestID; material.StartDate = startDate; material.EndDate = endDate; return material; }
public Material Insert(Material entity) { if (GetById(entity.ID) != null) return null; var id = _materials.Max(e => e.ID); var material = new Material(id, entity.Name, entity.EventID, entity.TypeID); _materials.Add(material); return material; }
public bool UpdateReservation(Material material, DateTime startDate, DateTime endDate) { if (material.GuestID == 0) return false; material.StartDate = startDate; material.EndDate = endDate; return true; }
public bool RemoveReservation(Material material) { return _contextMaterial.RemoveReservation(material); }
public Material Insert(Material entity) { return _contextMaterial.Insert(entity); }
public bool Delete(Material entity) { return _contextMaterial.Delete(entity); }
public Material AddReservation(Material material, int guestId, DateTime startDate, DateTime endDate) { return _contextMaterial.AddReservation(material, guestId, startDate, endDate); }
public bool UpdateReservation(Material material, DateTime startDate, DateTime endDate) { return _contextMaterial.UpdateReservation(material, startDate, endDate); }
public bool Update(Material entity) { return _contextMaterial.Update(entity); }