public bool Execute() { JugadorInsertar.Dni = JugadorInsertar.Dni.ToUpper(); ValidacionesRegexp.ValidarDniNie(JugadorInsertar.Dni); JugadorInsertar.Categoria = Utils.ObtenerCategoriaJugador(FechaNacimiento, 2019); JugadorInsertar.Fecha_Nacimiento = FechaNacimiento.Year + "-" + FechaNacimiento.Month + "-" + FechaNacimiento.Day; if (!JugadorInsertar.Foto.Equals("/Assets/defecto.jpg")) { string[] rutaimagen = JugadorInsertar.Foto.Split('/'); string urlImagen = BlobStorage.GuardarImagen(JugadorInsertar.Foto, rutaimagen[rutaimagen.Length - 1], JugadorInsertar); JugadorInsertar.Foto = urlImagen; } return(ApiRest.InsertJugador(JugadorInsertar)); }