Пример #1
0
        public void registrarHobby(int codigo, string descripcion)
        {
            try
            {
                hobby hb = new hobby();
                hb.codigo = codigo;
                hb.descripcion = descripcion;

                HobbyDAO hDAO = new HobbyDAO();
                hDAO.registrarHobby(hb);
            }
            catch (Exception e)
            {

                //throw new FaultException("El codigo ya se encuentra registrado. Ingreso uno distinto");
                throw new FaultException(e.Message);
            }
        }
Пример #2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the hobbies EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTohobbies(hobby hobby)
 {
     base.AddObject("hobbies", hobby);
 }
Пример #3
0
 /// <summary>
 /// Create a new hobby object.
 /// </summary>
 /// <param name="codigo">Initial value of the codigo property.</param>
 public static hobby Createhobby(global::System.Int32 codigo)
 {
     hobby hobby = new hobby();
     hobby.codigo = codigo;
     return hobby;
 }