public ActionResult SubirImg(HttpPostedFileBase uploadFile)
        {
            DataClasses1DataContext db = new DataClasses1DataContext();
            if (uploadFile.ContentLength > 0) {
                string filePath = Path.Combine(HttpContext.Server.MapPath("../Imagenes"), Path.GetFileName(uploadFile.FileName));
                uploadFile.SaveAs(filePath);
                perfil idper = db.perfils.Where(a => a.UserId == (Guid)Session["ids"]).ToArray()[0];
                avatar img = new avatar() { rutafisica = filePath, rutavirtual = "/Imagenes/" + uploadFile.FileName, idPerfil = idper.idPerfil, fecha = DateTime.Now };
                db.avatars.InsertOnSubmit(img);
                db.SubmitChanges();

            }
            return RedirectToAction("Perfil", "EditPerfil");
        }
 partial void Deleteavatar(avatar instance);
 partial void Updateavatar(avatar instance);
 partial void Insertavatar(avatar instance);
		private void detach_avatars(avatar entity)
		{
			this.SendPropertyChanging();
			entity.perfil = null;
		}
		private void attach_avatars(avatar entity)
		{
			this.SendPropertyChanging();
			entity.perfil = this;
		}