private void DoKuMenTYVOzIDel_Detach(DokumentyVozidel entity)
		{
			entity.Vozidla = null;
		}
        private void addFileToDb(uint vozidlo_id, string path)
        {
            DokumentyVozidel d;

            using (var db = DrivingScoolContextHelper.CreateDataContext2())
            {
                try
                {
                    db.DokumentyVozidel.InsertOnSubmit(d = new DokumentyVozidel() 
                    {
                        DatumVlozeni = DateTime.Now,
                        Dokument = System.IO.File.ReadAllBytes(path),
                        DokumentNazev = Path.GetFileName(path),
                        VozidloID = vozidlo_id,
                    });
                    db.SubmitChanges();
                }
                catch (MySqlException)
                {
                    throw new HttpResponseException(HttpStatusCode.InternalServerError);
                }
            }


            //HttpResponseMessage response = Request.CreateResponse();
            //return response;

        }
		private void DoKuMenTYVOzIDel_Attach(DokumentyVozidel entity)
		{
			entity.Vozidla = this;
		}