public IEnumerable <APIUsers.Library.Models.Promotion> GetPromotionsById([FromBody] APIUsers.Library.Models.Promotion value)
        {
            List <APIUsers.Library.Models.Promotion> listPromotions = new List <APIUsers.Library.Models.Promotion>();

            using (IPromotion promotion = Factorizador.CrearConexionServicio3(APIUsers.Library.Models.ConnectionType.MSSQL, ConnectionStringLocal))
            {
                listPromotions = promotion.GetPromotionsById(value.id);
            }
            return(listPromotions);
        }
        public int remove_promotion([FromBody] APIUsers.Library.Models.Promotion value)
        {
            int result = 0;

            using (IPromotion promotion = Factorizador.CrearConexionServicio3(APIUsers.Library.Models.ConnectionType.MSSQL, ConnectionStringLocal))
            {
                result = promotion.removePromotion(value.id);
            }
            return(result);
        }
        public int UpdatePromotion([FromBody] APIUsers.Library.Models.Promotion value)
        {
            int id = 0;

            using (IPromotion promotion = Factorizador.CrearConexionServicio3(APIUsers.Library.Models.ConnectionType.MSSQL, ConnectionStringLocal))
            {
                id = promotion.UpdatePromotion(
                    value.id, value.code, value.title, value.description, value.expires_date, value.theme, value.discount
                    );
            }
            return(id);
        }