public static bool Guardar(Medicinas medicina) { bool retorno = false; using (var conexion = new WebFarmaciaDb()) { conexion.Medicina.Add(medicina); conexion.SaveChanges(); retorno = true; } return(retorno); }
public static bool Guardar(Clientes cliente) { bool retorno = false; using (var db = new WebFarmaciaDb()) { try { db.Cliente.Add(cliente); db.SaveChanges(); retorno = true; } catch (Exception) { throw; } } return(retorno); }